diff options
59 files changed, 24428 insertions, 24428 deletions
diff --git a/apps/codecs/libgme/2413tone.h b/apps/codecs/libgme/2413tone.h index e4366ab..c0922c1 100644 --- a/apps/codecs/libgme/2413tone.h +++ b/apps/codecs/libgme/2413tone.h @@ -1,20 +1,20 @@ -/* YM2413 tone by okazaki@angel.ne.jp */
-0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x61,0x61,0x1e,0x17,0xf0,0x7f,0x00,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x13,0x41,0x16,0x0e,0xfd,0xf4,0x23,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x03,0x01,0x9a,0x04,0xf3,0xf3,0x13,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x11,0x61,0x0e,0x07,0xfa,0x64,0x70,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x22,0x16,0x05,0xf0,0x71,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x61,0x1d,0x07,0x82,0x80,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x23,0x21,0x2d,0x16,0x90,0x90,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x21,0x1b,0x06,0x64,0x65,0x10,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x21,0x0b,0x1a,0x85,0xa0,0x70,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x23,0x01,0x83,0x10,0xff,0xb4,0x10,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x97,0xc1,0x20,0x07,0xff,0xf4,0x22,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x61,0x00,0x0c,0x05,0xc2,0xf6,0x40,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x01,0x56,0x03,0x94,0xc2,0x03,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x01,0x89,0x03,0xf1,0xe4,0xf0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+/* YM2413 tone by okazaki@angel.ne.jp */ +0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x61,0x61,0x1e,0x17,0xf0,0x7f,0x00,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x13,0x41,0x16,0x0e,0xfd,0xf4,0x23,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x03,0x01,0x9a,0x04,0xf3,0xf3,0x13,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x11,0x61,0x0e,0x07,0xfa,0x64,0x70,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x22,0x16,0x05,0xf0,0x71,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x61,0x1d,0x07,0x82,0x80,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x23,0x21,0x2d,0x16,0x90,0x90,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x21,0x1b,0x06,0x64,0x65,0x10,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x21,0x0b,0x1a,0x85,0xa0,0x70,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x23,0x01,0x83,0x10,0xff,0xb4,0x10,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x97,0xc1,0x20,0x07,0xff,0xf4,0x22,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x61,0x00,0x0c,0x05,0xc2,0xf6,0x40,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x01,0x56,0x03,0x94,0xc2,0x03,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x01,0x89,0x03,0xf1,0xe4,0xf0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 diff --git a/apps/codecs/libgme/281btone.h b/apps/codecs/libgme/281btone.h index 1300523..83f63bf 100644 --- a/apps/codecs/libgme/281btone.h +++ b/apps/codecs/libgme/281btone.h @@ -1,20 +1,20 @@ -/* YMF281B tone by Chabin */
-0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x62,0x21,0x1a,0x07,0xf0,0x6f,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x10,0x44,0x02,0xf6,0xf4,0x54,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x03,0x01,0x97,0x04,0xf3,0xf3,0x13,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x61,0x0a,0x0f,0xfa,0x64,0x70,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x61,0x8a,0x0e,0xc0,0x61,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x61,0x1b,0x07,0x84,0x80,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x37,0x32,0xc9,0x01,0x66,0x64,0x40,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x21,0x06,0x03,0xa5,0x71,0x51,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x06,0x11,0x5e,0x07,0xf3,0xf2,0xf6,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x20,0x18,0x06,0xf5,0xf3,0x20,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x97,0x41,0x20,0x07,0xff,0xf4,0x22,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x65,0x61,0x15,0x00,0xf7,0xf3,0x16,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x31,0x0e,0x07,0xfa,0xf3,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x61,0x09,0x07,0xf1,0x94,0xf0,0xf5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+/* YMF281B tone by Chabin */ +0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x62,0x21,0x1a,0x07,0xf0,0x6f,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x10,0x44,0x02,0xf6,0xf4,0x54,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x03,0x01,0x97,0x04,0xf3,0xf3,0x13,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x61,0x0a,0x0f,0xfa,0x64,0x70,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x61,0x8a,0x0e,0xc0,0x61,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x61,0x1b,0x07,0x84,0x80,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x37,0x32,0xc9,0x01,0x66,0x64,0x40,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x21,0x06,0x03,0xa5,0x71,0x51,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x06,0x11,0x5e,0x07,0xf3,0xf2,0xf6,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x20,0x18,0x06,0xf5,0xf3,0x20,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x97,0x41,0x20,0x07,0xff,0xf4,0x22,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x65,0x61,0x15,0x00,0xf7,0xf3,0x16,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x31,0x0e,0x07,0xfa,0xf3,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x48,0x61,0x09,0x07,0xf1,0x94,0xf0,0xf5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 diff --git a/apps/codecs/libgme/ay_emu.c b/apps/codecs/libgme/ay_emu.c index 42e739f..92faba4 100644 --- a/apps/codecs/libgme/ay_emu.c +++ b/apps/codecs/libgme/ay_emu.c @@ -1,599 +1,599 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-#include "ay_emu.h"
-
-#include "blargg_endian.h"
-
-/* Copyright (C) 2006-2009 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#include "blargg_source.h"
-
-const char* const gme_wrong_file_type = "Wrong file type for this emulator";
-
-// TODO: probably don't need detailed errors as to why file is corrupt
-
-int const spectrum_clock = 3546900; // 128K Spectrum
-int const spectrum_period = 70908;
-
-//int const spectrum_clock = 3500000; // 48K Spectrum
-//int const spectrum_period = 69888;
-
-int const cpc_clock = 2000000;
-
-static void clear_track_vars( struct Ay_Emu *this )
-{
- this->current_track = -1;
- track_stop( &this->track_filter );
-}
-
-void Ay_init( struct Ay_Emu *this )
-{
- this->sample_rate = 0;
- this->mute_mask_ = 0;
- this->tempo = (int)FP_ONE_TEMPO;
- this->gain = (int)FP_ONE_GAIN;
- this->track_count = 0;
-
- // defaults
- this->tfilter = *track_get_setup( &this->track_filter );
- this->tfilter.max_initial = 2;
- this->tfilter.lookahead = 6;
- this->track_filter.silence_ignored_ = false;
-
- this->beeper_output = NULL;
- disable_beeper( this );
-
- Ay_apu_init( &this->apu );
- Z80_init( &this->cpu );
-
- // clears fields
- this->voice_count = 0;
- this->voice_types = 0;
- clear_track_vars( this );
-}
-
-// Track info
-
-// Given pointer to 2-byte offset of data, returns pointer to data, or NULL if
-// offset is 0 or there is less than min_size bytes of data available.
-static byte const* get_data( struct file_t const* file, byte const ptr [], int min_size )
-{
- int offset = (int16_t) get_be16( ptr );
- int pos = ptr - (byte const*) file->header;
- int size = file->end - (byte const*) file->header;
- assert( (unsigned) pos <= (unsigned) size - 2 );
- int limit = size - min_size;
- if ( limit < 0 || !offset || (unsigned) (pos + offset) > (unsigned) limit )
- return NULL;
- return ptr + offset;
-}
-
-static blargg_err_t parse_header( byte const in [], int size, struct file_t* out )
-{
- if ( size < header_size )
- return gme_wrong_file_type;
-
- out->header = (struct header_t const*) in;
- out->end = in + size;
- struct header_t const* h = (struct header_t const*) in;
- if ( memcmp( h->tag, "ZXAYEMUL", 8 ) )
- return gme_wrong_file_type;
-
- out->tracks = get_data( out, h->track_info, (h->max_track + 1) * 4 );
- if ( !out->tracks )
- return "missing track data";
-
- return 0;
-}
-
-// Setup
-
-static void change_clock_rate( struct Ay_Emu *this, int rate )
-{
- this->clock_rate_ = rate;
- Buffer_clock_rate( &this->stereo_buf, rate );
-}
-
-blargg_err_t Ay_load_mem( struct Ay_Emu *this, byte const in [], long size )
-{
- // Unload
- this->voice_count = 0;
- this->track_count = 0;
- this->m3u.size = 0;
- clear_track_vars( this );
-
- assert( offsetof (struct header_t,track_info [2]) == header_size );
-
- RETURN_ERR( parse_header( in, size, &this->file ) );
-
- /* if ( file.header->vers > 2 )
- warning( "Unknown file version" ); */
-
- this->voice_count = ay_osc_count + 1; // +1 for beeper
- static int const types [ay_osc_count + 1] = {
- wave_type+0, wave_type+1, wave_type+2, mixed_type+1
- };
- this->voice_types = types;
-
- Ay_apu_volume( &this->apu, this->gain);
-
- // Setup buffer
- change_clock_rate( this, spectrum_clock );
- RETURN_ERR( Buffer_set_channel_count( &this->stereo_buf, this->voice_count, this->voice_types ) );
- this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf );
-
- Sound_set_tempo( this, this->tempo );
- Sound_mute_voices( this, this->mute_mask_ );
-
- this->track_count = this->file.header->max_track + 1;
- return 0;
-}
-
-static void set_beeper_output( struct Ay_Emu *this, struct Blip_Buffer* b )
-{
- this->beeper_output = b;
- if ( b && !this->cpc_mode )
- this->beeper_mask = 0x10;
- else
- disable_beeper( this );
-}
-
-static void set_voice( struct Ay_Emu *this, int i, struct Blip_Buffer* center )
-{
- if ( i >= ay_osc_count )
- set_beeper_output( this, center );
- else
- Ay_apu_set_output( &this->apu, i, center );
-}
-
-static blargg_err_t run_clocks( struct Ay_Emu *this, blip_time_t* duration, int msec )
-{
-#if defined(ROCKBOX)
- (void) msec;
-#endif
-
- cpu_time_t *end = duration;
- struct Z80_Cpu* cpu = &this->cpu;
- Z80_set_time( cpu, 0 );
-
- // Since detection of CPC mode will halve clock rate during the frame
- // and thus generate up to twice as much sound, we must generate half
- // as much until mode is known.
- if ( !(this->spectrum_mode | this->cpc_mode) )
- *end /= 2;
-
- while ( Z80_time( cpu ) < *end )
- {
- run_cpu( this, min( *end, this->next_play ) );
-
- if ( Z80_time( cpu ) >= this->next_play )
- {
- // next frame
- this->next_play += this->play_period;
-
- if ( cpu->r.iff1 )
- {
- // interrupt enabled
-
- if ( this->mem.ram [cpu->r.pc] == 0x76 )
- cpu->r.pc++; // advance past HALT instruction
-
- cpu->r.iff1 = 0;
- cpu->r.iff2 = 0;
-
- this->mem.ram [--cpu->r.sp] = (byte) (cpu->r.pc >> 8);
- this->mem.ram [--cpu->r.sp] = (byte) (cpu->r.pc);
-
- // fixed interrupt
- cpu->r.pc = 0x38;
- Z80_adjust_time( cpu, 12 );
-
- if ( cpu->r.im == 2 )
- {
- // vectored interrupt
- addr_t addr = cpu->r.i * 0x100 + 0xFF;
- cpu->r.pc = this->mem.ram [(addr + 1) & 0xFFFF] * 0x100 + this->mem.ram [addr];
- Z80_adjust_time( cpu, 6 );
- }
- }
- }
- }
-
- // End time frame
- *end = Z80_time( cpu );
- this->next_play -= *end;
- check( this->next_play >= 0 );
- Z80_adjust_time( cpu, -*end );
- Ay_apu_end_frame( &this->apu, *end );
- return 0;
-}
-
-// Emulation
-
-void cpu_out_( struct Ay_Emu *this, cpu_time_t time, addr_t addr, int data )
-{
- // Spectrum
- if ( !this->cpc_mode )
- {
- switch ( addr & 0xFEFF )
- {
- case 0xFEFD:
- this->spectrum_mode = true;
- Ay_apu_write_addr( &this->apu, data );
- return;
-
- case 0xBEFD:
- this->spectrum_mode = true;
- Ay_apu_write_data( &this->apu, time, data );
- return;
- }
- }
-
- // CPC
- if ( !this->spectrum_mode )
- {
- switch ( addr >> 8 )
- {
- case 0xF6:
- switch ( data & 0xC0 )
- {
- case 0xC0:
- Ay_apu_write_addr( &this->apu, this->cpc_latch );
- goto enable_cpc;
-
- case 0x80:
- Ay_apu_write_data( &this->apu, time, this->cpc_latch );
- goto enable_cpc;
- }
- break;
-
- case 0xF4:
- this->cpc_latch = data;
- goto enable_cpc;
- }
- }
-
- /* dprintf( "Unmapped OUT: $%04X <- $%02X\n", addr, data ); */
- return;
-
-enable_cpc:
- if ( !this->cpc_mode )
- {
- this->cpc_mode = true;
- disable_beeper( this );
-
- change_clock_rate( this, cpc_clock );
- Sound_set_tempo( this, this->tempo );
- }
-}
-
-blargg_err_t Ay_set_sample_rate( struct Ay_Emu *this, int rate )
-{
- require( !this->sample_rate ); // sample rate can't be changed once set
- Buffer_init( &this->stereo_buf );
- RETURN_ERR( Buffer_set_sample_rate( &this->stereo_buf, rate, 1000 / 20 ) );
-
- // Set buffer bass
- Buffer_bass_freq( &this->stereo_buf, 160 );
-
- this->sample_rate = rate;
- RETURN_ERR( track_init( &this->track_filter, this ) );
- this->tfilter.max_silence = 6 * stereo * this->sample_rate;
- return 0;
-}
-
-void Sound_mute_voice( struct Ay_Emu *this, int index, bool mute )
-{
- require( (unsigned) index < (unsigned) this->voice_count );
- int bit = 1 << index;
- int mask = this->mute_mask_ | bit;
- if ( !mute )
- mask ^= bit;
- Sound_mute_voices( this, mask );
-}
-
-void Sound_mute_voices( struct Ay_Emu *this, int mask )
-{
- require( this->sample_rate ); // sample rate must be set first
- this->mute_mask_ = mask;
-
- int i;
- for ( i = this->voice_count; i--; )
- {
- if ( mask & (1 << i) )
- {
- set_voice( this, i, 0 );
- }
- else
- {
- struct channel_t ch = Buffer_channel( &this->stereo_buf, i );
- assert( (ch.center && ch.left && ch.right) ||
- (!ch.center && !ch.left && !ch.right) ); // all or nothing
- set_voice( this, i, ch.center );
- }
- }
-}
-
-void Sound_set_tempo( struct Ay_Emu *this, int t )
-{
- require( this->sample_rate ); // sample rate must be set first
- int const min = (int)(FP_ONE_TEMPO*0.02);
- int const max = (int)(FP_ONE_TEMPO*4.00);
- if ( t < min ) t = min;
- if ( t > max ) t = max;
- this->tempo = t;
-
- int p = spectrum_period;
- if ( this->clock_rate_ != spectrum_clock )
- p = this->clock_rate_ / 50;
-
- this->play_period = (blip_time_t) ((p * FP_ONE_TEMPO) / t);
-}
-
-blargg_err_t Ay_start_track( struct Ay_Emu *this, int track )
-{
- clear_track_vars( this );
-
- // Remap track if playlist available
- if ( this->m3u.size > 0 ) {
- struct entry_t* e = &this->m3u.entries[track];
- track = e->track;
- }
-
- this->current_track = track;
- Buffer_clear( &this->stereo_buf );
-
- byte* const mem = this->mem.ram;
-
- memset( mem + 0x0000, 0xC9, 0x100 ); // fill RST vectors with RET
- memset( mem + 0x0100, 0xFF, 0x4000 - 0x100 );
- memset( mem + ram_addr, 0x00, mem_size - ram_addr );
-
- // locate data blocks
- byte const* const data = get_data( &this->file, this->file.tracks + track * 4 + 2, 14 );
- if ( !data )
- return "file data missing";
-
- byte const* const more_data = get_data( &this->file, data + 10, 6 );
- if ( !more_data )
- return "file data missing";
-
- byte const* blocks = get_data( &this->file, data + 12, 8 );
- if ( !blocks )
- return "file data missing";
-
- // initial addresses
- unsigned addr = get_be16( blocks );
- if ( !addr )
- return "file data missing";
-
- unsigned init = get_be16( more_data + 2 );
- if ( !init )
- init = addr;
-
- // copy blocks into memory
- do
- {
- blocks += 2;
- unsigned len = get_be16( blocks ); blocks += 2;
- if ( addr + len > mem_size )
- {
- /* warning( "Bad data block size" ); */
- len = mem_size - addr;
- }
- check( len );
- byte const* in = get_data( &this->file, blocks, 0 ); blocks += 2;
- if ( len > (unsigned) (this->file.end - in) )
- {
- /* warning( "File data missing" ); */
- len = this->file.end - in;
- }
-
- memcpy( mem + addr, in, len );
-
- if ( this->file.end - blocks < 8 )
- {
- /* warning( "File data missing" ); */
- break;
- }
- }
- while ( (addr = get_be16( blocks )) != 0 );
-
- // copy and configure driver
- static byte const passive [] = {
- 0xF3, // DI
- 0xCD, 0, 0, // CALL init
- 0xED, 0x5E, // LOOP: IM 2
- 0xFB, // EI
- 0x76, // HALT
- 0x18, 0xFA // JR LOOP
- };
- static byte const active [] = {
- 0xF3, // DI
- 0xCD, 0, 0, // CALL init
- 0xED, 0x56, // LOOP: IM 1
- 0xFB, // EI
- 0x76, // HALT
- 0xCD, 0, 0, // CALL play
- 0x18, 0xF7 // JR LOOP
- };
- memcpy( mem, passive, sizeof passive );
- int const play_addr = get_be16( more_data + 4 );
- if ( play_addr )
- {
- memcpy( mem, active, sizeof active );
- mem [ 9] = play_addr;
- mem [10] = play_addr >> 8;
- }
- mem [2] = init;
- mem [3] = init >> 8;
-
- mem [0x38] = 0xFB; // Put EI at interrupt vector (followed by RET)
-
- // start at spectrum speed
- change_clock_rate( this, spectrum_clock );
- Sound_set_tempo( this, this->tempo );
-
- struct registers_t r;
- memset( &r, 0, sizeof(struct registers_t) );
-
- r.sp = get_be16( more_data );
- r.b.a = r.b.b = r.b.d = r.b.h = data [8];
- r.b.flags = r.b.c = r.b.e = r.b.l = data [9];
- r.alt.w = r.w;
- r.ix = r.iy = r.w.hl;
-
- memset( this->mem.padding1, 0xFF, sizeof this->mem.padding1 );
-
- int const mirrored = 0x80; // this much is mirrored after end of memory
- memset( this->mem.ram + mem_size + mirrored, 0xFF, sizeof this->mem.ram - mem_size - mirrored );
- memcpy( this->mem.ram + mem_size, this->mem.ram, mirrored ); // some code wraps around (ugh)
-
- Z80_reset( &this->cpu, this->mem.padding1, this->mem.padding1 );
- Z80_map_mem( &this->cpu, 0, mem_size, this->mem.ram, this->mem.ram );
- this->cpu.r = r;
-
- this->beeper_delta = (int) ((ay_amp_range*4)/5);
- this->last_beeper = 0;
- this->next_play = this->play_period;
- this->spectrum_mode = false;
- this->cpc_mode = false;
- this->cpc_latch = 0;
- set_beeper_output( this, this->beeper_output );
- Ay_apu_reset( &this->apu );
-
- // a few tunes rely on channels having tone enabled at the beginning
- Ay_apu_write_addr( &this->apu, 7 );
- Ay_apu_write_data( &this->apu, 0, 0x38 );
-
- // convert filter times to samples
- struct setup_t s = this->tfilter;
- s.max_initial *= this->sample_rate * stereo;
- #ifdef GME_DISABLE_SILENCE_LOOKAHEAD
- s.lookahead = 1;
- #endif
- track_setup( &this->track_filter, &s );
-
- return track_start( &this->track_filter );
-}
-
-// Tell/Seek
-
-static int msec_to_samples( int msec, int sample_rate )
-{
- int sec = msec / 1000;
- msec -= sec * 1000;
- return (sec * sample_rate + msec * sample_rate / 1000) * stereo;
-}
-
-int Track_tell( struct Ay_Emu *this )
-{
- int rate = this->sample_rate * stereo;
- int sec = track_sample_count( &this->track_filter ) / rate;
- return sec * 1000 + (track_sample_count( &this->track_filter ) - sec * rate) * 1000 / rate;
-}
-
-blargg_err_t Track_seek( struct Ay_Emu *this, int msec )
-{
- int time = msec_to_samples( msec, this->sample_rate );
- if ( time < track_sample_count( &this->track_filter ) )
- RETURN_ERR( Ay_start_track( this, this->current_track ) );
- return Track_skip( this, time - track_sample_count( &this->track_filter ) );
-}
-
-blargg_err_t skip_( void *emu, int count )
-{
- struct Ay_Emu* this = (struct Ay_Emu*) emu;
-
- // for long skip, mute sound
- const int threshold = 32768;
- if ( count > threshold )
- {
- int saved_mute = this->mute_mask_;
- Sound_mute_voices( this, ~0 );
-
- int n = count - threshold/2;
- n &= ~(2048-1); // round to multiple of 2048
- count -= n;
- RETURN_ERR( skippy_( &this->track_filter, n ) );
-
- Sound_mute_voices( this, saved_mute );
- }
-
- return skippy_( &this->track_filter, count );
-}
-
-blargg_err_t Track_skip( struct Ay_Emu *this, int count )
-{
- require( this->current_track >= 0 ); // start_track() must have been called already
- return track_skip( &this->track_filter, count );
-}
-
-int Track_get_length( struct Ay_Emu* this, int n )
-{
- int length = 0;
-
- byte const* track_info = get_data( &this->file, this->file.tracks + n * 4 + 2, 6 );
- if ( track_info )
- length = get_be16( track_info + 4 ) * (1000 / 50); // frames to msec
-
- if ( (this->m3u.size > 0) && (n < this->m3u.size) ) {
- struct entry_t* entry = &this->m3u.entries [n];
- length = entry->length;
- }
-
- if ( length <= 0 )
- length = 120 * 1000; /* 2 minutes */
-
- return length;
-}
-
-void Track_set_fade( struct Ay_Emu *this, int start_msec, int length_msec )
-{
- track_set_fade( &this->track_filter, msec_to_samples( start_msec, this->sample_rate ),
- length_msec * this->sample_rate / (1000 / stereo) );
-}
-
-blargg_err_t Ay_play( struct Ay_Emu *this, int out_count, sample_t* out )
-{
- require( this->current_track >= 0 );
- require( out_count % stereo == 0 );
- return track_play( &this->track_filter, out_count, out );
-}
-
-blargg_err_t play_( void *emu, int count, sample_t* out )
-{
- struct Ay_Emu* this = (struct Ay_Emu*) emu;
-
- int remain = count;
- while ( remain )
- {
- Buffer_disable_immediate_removal( &this->stereo_buf );
- remain -= Buffer_read_samples( &this->stereo_buf, &out [count - remain], remain );
- if ( remain )
- {
- if ( this->buf_changed_count != Buffer_channels_changed_count( &this->stereo_buf ) )
- {
- this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf );
-
- // Remute voices
- Sound_mute_voices( this, this->mute_mask_ );
- }
- int msec = Buffer_length( &this->stereo_buf );
- blip_time_t clocks_emulated = msec * this->clock_rate_ / 1000 - 100;
- RETURN_ERR( run_clocks( this, &clocks_emulated, msec ) );
- assert( clocks_emulated );
- Buffer_end_frame( &this->stereo_buf, clocks_emulated );
- }
- }
- return 0;
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +#include "ay_emu.h" + +#include "blargg_endian.h" + +/* Copyright (C) 2006-2009 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "blargg_source.h" + +const char* const gme_wrong_file_type = "Wrong file type for this emulator"; + +// TODO: probably don't need detailed errors as to why file is corrupt + +int const spectrum_clock = 3546900; // 128K Spectrum +int const spectrum_period = 70908; + +//int const spectrum_clock = 3500000; // 48K Spectrum +//int const spectrum_period = 69888; + +int const cpc_clock = 2000000; + +static void clear_track_vars( struct Ay_Emu *this ) +{ + this->current_track = -1; + track_stop( &this->track_filter ); +} + +void Ay_init( struct Ay_Emu *this ) +{ + this->sample_rate = 0; + this->mute_mask_ = 0; + this->tempo = (int)FP_ONE_TEMPO; + this->gain = (int)FP_ONE_GAIN; + this->track_count = 0; + + // defaults + this->tfilter = *track_get_setup( &this->track_filter ); + this->tfilter.max_initial = 2; + this->tfilter.lookahead = 6; + this->track_filter.silence_ignored_ = false; + + this->beeper_output = NULL; + disable_beeper( this ); + + Ay_apu_init( &this->apu ); + Z80_init( &this->cpu ); + + // clears fields + this->voice_count = 0; + this->voice_types = 0; + clear_track_vars( this ); +} + +// Track info + +// Given pointer to 2-byte offset of data, returns pointer to data, or NULL if +// offset is 0 or there is less than min_size bytes of data available. +static byte const* get_data( struct file_t const* file, byte const ptr [], int min_size ) +{ + int offset = (int16_t) get_be16( ptr ); + int pos = ptr - (byte const*) file->header; + int size = file->end - (byte const*) file->header; + assert( (unsigned) pos <= (unsigned) size - 2 ); + int limit = size - min_size; + if ( limit < 0 || !offset || (unsigned) (pos + offset) > (unsigned) limit ) + return NULL; + return ptr + offset; +} + +static blargg_err_t parse_header( byte const in [], int size, struct file_t* out ) +{ + if ( size < header_size ) + return gme_wrong_file_type; + + out->header = (struct header_t const*) in; + out->end = in + size; + struct header_t const* h = (struct header_t const*) in; + if ( memcmp( h->tag, "ZXAYEMUL", 8 ) ) + return gme_wrong_file_type; + + out->tracks = get_data( out, h->track_info, (h->max_track + 1) * 4 ); + if ( !out->tracks ) + return "missing track data"; + + return 0; +} + +// Setup + +static void change_clock_rate( struct Ay_Emu *this, int rate ) +{ + this->clock_rate_ = rate; + Buffer_clock_rate( &this->stereo_buf, rate ); +} + +blargg_err_t Ay_load_mem( struct Ay_Emu *this, byte const in [], long size ) +{ + // Unload + this->voice_count = 0; + this->track_count = 0; + this->m3u.size = 0; + clear_track_vars( this ); + + assert( offsetof (struct header_t,track_info [2]) == header_size ); + + RETURN_ERR( parse_header( in, size, &this->file ) ); + + /* if ( file.header->vers > 2 ) + warning( "Unknown file version" ); */ + + this->voice_count = ay_osc_count + 1; // +1 for beeper + static int const types [ay_osc_count + 1] = { + wave_type+0, wave_type+1, wave_type+2, mixed_type+1 + }; + this->voice_types = types; + + Ay_apu_volume( &this->apu, this->gain); + + // Setup buffer + change_clock_rate( this, spectrum_clock ); + RETURN_ERR( Buffer_set_channel_count( &this->stereo_buf, this->voice_count, this->voice_types ) ); + this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf ); + + Sound_set_tempo( this, this->tempo ); + Sound_mute_voices( this, this->mute_mask_ ); + + this->track_count = this->file.header->max_track + 1; + return 0; +} + +static void set_beeper_output( struct Ay_Emu *this, struct Blip_Buffer* b ) +{ + this->beeper_output = b; + if ( b && !this->cpc_mode ) + this->beeper_mask = 0x10; + else + disable_beeper( this ); +} + +static void set_voice( struct Ay_Emu *this, int i, struct Blip_Buffer* center ) +{ + if ( i >= ay_osc_count ) + set_beeper_output( this, center ); + else + Ay_apu_set_output( &this->apu, i, center ); +} + +static blargg_err_t run_clocks( struct Ay_Emu *this, blip_time_t* duration, int msec ) +{ +#if defined(ROCKBOX) + (void) msec; +#endif + + cpu_time_t *end = duration; + struct Z80_Cpu* cpu = &this->cpu; + Z80_set_time( cpu, 0 ); + + // Since detection of CPC mode will halve clock rate during the frame + // and thus generate up to twice as much sound, we must generate half + // as much until mode is known. + if ( !(this->spectrum_mode | this->cpc_mode) ) + *end /= 2; + + while ( Z80_time( cpu ) < *end ) + { + run_cpu( this, min( *end, this->next_play ) ); + + if ( Z80_time( cpu ) >= this->next_play ) + { + // next frame + this->next_play += this->play_period; + + if ( cpu->r.iff1 ) + { + // interrupt enabled + + if ( this->mem.ram [cpu->r.pc] == 0x76 ) + cpu->r.pc++; // advance past HALT instruction + + cpu->r.iff1 = 0; + cpu->r.iff2 = 0; + + this->mem.ram [--cpu->r.sp] = (byte) (cpu->r.pc >> 8); + this->mem.ram [--cpu->r.sp] = (byte) (cpu->r.pc); + + // fixed interrupt + cpu->r.pc = 0x38; + Z80_adjust_time( cpu, 12 ); + + if ( cpu->r.im == 2 ) + { + // vectored interrupt + addr_t addr = cpu->r.i * 0x100 + 0xFF; + cpu->r.pc = this->mem.ram [(addr + 1) & 0xFFFF] * 0x100 + this->mem.ram [addr]; + Z80_adjust_time( cpu, 6 ); + } + } + } + } + + // End time frame + *end = Z80_time( cpu ); + this->next_play -= *end; + check( this->next_play >= 0 ); + Z80_adjust_time( cpu, -*end ); + Ay_apu_end_frame( &this->apu, *end ); + return 0; +} + +// Emulation + +void cpu_out_( struct Ay_Emu *this, cpu_time_t time, addr_t addr, int data ) +{ + // Spectrum + if ( !this->cpc_mode ) + { + switch ( addr & 0xFEFF ) + { + case 0xFEFD: + this->spectrum_mode = true; + Ay_apu_write_addr( &this->apu, data ); + return; + + case 0xBEFD: + this->spectrum_mode = true; + Ay_apu_write_data( &this->apu, time, data ); + return; + } + } + + // CPC + if ( !this->spectrum_mode ) + { + switch ( addr >> 8 ) + { + case 0xF6: + switch ( data & 0xC0 ) + { + case 0xC0: + Ay_apu_write_addr( &this->apu, this->cpc_latch ); + goto enable_cpc; + + case 0x80: + Ay_apu_write_data( &this->apu, time, this->cpc_latch ); + goto enable_cpc; + } + break; + + case 0xF4: + this->cpc_latch = data; + goto enable_cpc; + } + } + + /* dprintf( "Unmapped OUT: $%04X <- $%02X\n", addr, data ); */ + return; + +enable_cpc: + if ( !this->cpc_mode ) + { + this->cpc_mode = true; + disable_beeper( this ); + + change_clock_rate( this, cpc_clock ); + Sound_set_tempo( this, this->tempo ); + } +} + +blargg_err_t Ay_set_sample_rate( struct Ay_Emu *this, int rate ) +{ + require( !this->sample_rate ); // sample rate can't be changed once set + Buffer_init( &this->stereo_buf ); + RETURN_ERR( Buffer_set_sample_rate( &this->stereo_buf, rate, 1000 / 20 ) ); + + // Set buffer bass + Buffer_bass_freq( &this->stereo_buf, 160 ); + + this->sample_rate = rate; + RETURN_ERR( track_init( &this->track_filter, this ) ); + this->tfilter.max_silence = 6 * stereo * this->sample_rate; + return 0; +} + +void Sound_mute_voice( struct Ay_Emu *this, int index, bool mute ) +{ + require( (unsigned) index < (unsigned) this->voice_count ); + int bit = 1 << index; + int mask = this->mute_mask_ | bit; + if ( !mute ) + mask ^= bit; + Sound_mute_voices( this, mask ); +} + +void Sound_mute_voices( struct Ay_Emu *this, int mask ) +{ + require( this->sample_rate ); // sample rate must be set first + this->mute_mask_ = mask; + + int i; + for ( i = this->voice_count; i--; ) + { + if ( mask & (1 << i) ) + { + set_voice( this, i, 0 ); + } + else + { + struct channel_t ch = Buffer_channel( &this->stereo_buf, i ); + assert( (ch.center && ch.left && ch.right) || + (!ch.center && !ch.left && !ch.right) ); // all or nothing + set_voice( this, i, ch.center ); + } + } +} + +void Sound_set_tempo( struct Ay_Emu *this, int t ) +{ + require( this->sample_rate ); // sample rate must be set first + int const min = (int)(FP_ONE_TEMPO*0.02); + int const max = (int)(FP_ONE_TEMPO*4.00); + if ( t < min ) t = min; + if ( t > max ) t = max; + this->tempo = t; + + int p = spectrum_period; + if ( this->clock_rate_ != spectrum_clock ) + p = this->clock_rate_ / 50; + + this->play_period = (blip_time_t) ((p * FP_ONE_TEMPO) / t); +} + +blargg_err_t Ay_start_track( struct Ay_Emu *this, int track ) +{ + clear_track_vars( this ); + + // Remap track if playlist available + if ( this->m3u.size > 0 ) { + struct entry_t* e = &this->m3u.entries[track]; + track = e->track; + } + + this->current_track = track; + Buffer_clear( &this->stereo_buf ); + + byte* const mem = this->mem.ram; + + memset( mem + 0x0000, 0xC9, 0x100 ); // fill RST vectors with RET + memset( mem + 0x0100, 0xFF, 0x4000 - 0x100 ); + memset( mem + ram_addr, 0x00, mem_size - ram_addr ); + + // locate data blocks + byte const* const data = get_data( &this->file, this->file.tracks + track * 4 + 2, 14 ); + if ( !data ) + return "file data missing"; + + byte const* const more_data = get_data( &this->file, data + 10, 6 ); + if ( !more_data ) + return "file data missing"; + + byte const* blocks = get_data( &this->file, data + 12, 8 ); + if ( !blocks ) + return "file data missing"; + + // initial addresses + unsigned addr = get_be16( blocks ); + if ( !addr ) + return "file data missing"; + + unsigned init = get_be16( more_data + 2 ); + if ( !init ) + init = addr; + + // copy blocks into memory + do + { + blocks += 2; + unsigned len = get_be16( blocks ); blocks += 2; + if ( addr + len > mem_size ) + { + /* warning( "Bad data block size" ); */ + len = mem_size - addr; + } + check( len ); + byte const* in = get_data( &this->file, blocks, 0 ); blocks += 2; + if ( len > (unsigned) (this->file.end - in) ) + { + /* warning( "File data missing" ); */ + len = this->file.end - in; + } + + memcpy( mem + addr, in, len ); + + if ( this->file.end - blocks < 8 ) + { + /* warning( "File data missing" ); */ + break; + } + } + while ( (addr = get_be16( blocks )) != 0 ); + + // copy and configure driver + static byte const passive [] = { + 0xF3, // DI + 0xCD, 0, 0, // CALL init + 0xED, 0x5E, // LOOP: IM 2 + 0xFB, // EI + 0x76, // HALT + 0x18, 0xFA // JR LOOP + }; + static byte const active [] = { + 0xF3, // DI + 0xCD, 0, 0, // CALL init + 0xED, 0x56, // LOOP: IM 1 + 0xFB, // EI + 0x76, // HALT + 0xCD, 0, 0, // CALL play + 0x18, 0xF7 // JR LOOP + }; + memcpy( mem, passive, sizeof passive ); + int const play_addr = get_be16( more_data + 4 ); + if ( play_addr ) + { + memcpy( mem, active, sizeof active ); + mem [ 9] = play_addr; + mem [10] = play_addr >> 8; + } + mem [2] = init; + mem [3] = init >> 8; + + mem [0x38] = 0xFB; // Put EI at interrupt vector (followed by RET) + + // start at spectrum speed + change_clock_rate( this, spectrum_clock ); + Sound_set_tempo( this, this->tempo ); + + struct registers_t r; + memset( &r, 0, sizeof(struct registers_t) ); + + r.sp = get_be16( more_data ); + r.b.a = r.b.b = r.b.d = r.b.h = data [8]; + r.b.flags = r.b.c = r.b.e = r.b.l = data [9]; + r.alt.w = r.w; + r.ix = r.iy = r.w.hl; + + memset( this->mem.padding1, 0xFF, sizeof this->mem.padding1 ); + + int const mirrored = 0x80; // this much is mirrored after end of memory + memset( this->mem.ram + mem_size + mirrored, 0xFF, sizeof this->mem.ram - mem_size - mirrored ); + memcpy( this->mem.ram + mem_size, this->mem.ram, mirrored ); // some code wraps around (ugh) + + Z80_reset( &this->cpu, this->mem.padding1, this->mem.padding1 ); + Z80_map_mem( &this->cpu, 0, mem_size, this->mem.ram, this->mem.ram ); + this->cpu.r = r; + + this->beeper_delta = (int) ((ay_amp_range*4)/5); + this->last_beeper = 0; + this->next_play = this->play_period; + this->spectrum_mode = false; + this->cpc_mode = false; + this->cpc_latch = 0; + set_beeper_output( this, this->beeper_output ); + Ay_apu_reset( &this->apu ); + + // a few tunes rely on channels having tone enabled at the beginning + Ay_apu_write_addr( &this->apu, 7 ); + Ay_apu_write_data( &this->apu, 0, 0x38 ); + + // convert filter times to samples + struct setup_t s = this->tfilter; + s.max_initial *= this->sample_rate * stereo; + #ifdef GME_DISABLE_SILENCE_LOOKAHEAD + s.lookahead = 1; + #endif + track_setup( &this->track_filter, &s ); + + return track_start( &this->track_filter ); +} + +// Tell/Seek + +static int msec_to_samples( int msec, int sample_rate ) +{ + int sec = msec / 1000; + msec -= sec * 1000; + return (sec * sample_rate + msec * sample_rate / 1000) * stereo; +} + +int Track_tell( struct Ay_Emu *this ) +{ + int rate = this->sample_rate * stereo; + int sec = track_sample_count( &this->track_filter ) / rate; + return sec * 1000 + (track_sample_count( &this->track_filter ) - sec * rate) * 1000 / rate; +} + +blargg_err_t Track_seek( struct Ay_Emu *this, int msec ) +{ + int time = msec_to_samples( msec, this->sample_rate ); + if ( time < track_sample_count( &this->track_filter ) ) + RETURN_ERR( Ay_start_track( this, this->current_track ) ); + return Track_skip( this, time - track_sample_count( &this->track_filter ) ); +} + +blargg_err_t skip_( void *emu, int count ) +{ + struct Ay_Emu* this = (struct Ay_Emu*) emu; + + // for long skip, mute sound + const int threshold = 32768; + if ( count > threshold ) + { + int saved_mute = this->mute_mask_; + Sound_mute_voices( this, ~0 ); + + int n = count - threshold/2; + n &= ~(2048-1); // round to multiple of 2048 + count -= n; + RETURN_ERR( skippy_( &this->track_filter, n ) ); + + Sound_mute_voices( this, saved_mute ); + } + + return skippy_( &this->track_filter, count ); +} + +blargg_err_t Track_skip( struct Ay_Emu *this, int count ) +{ + require( this->current_track >= 0 ); // start_track() must have been called already + return track_skip( &this->track_filter, count ); +} + +int Track_get_length( struct Ay_Emu* this, int n ) +{ + int length = 0; + + byte const* track_info = get_data( &this->file, this->file.tracks + n * 4 + 2, 6 ); + if ( track_info ) + length = get_be16( track_info + 4 ) * (1000 / 50); // frames to msec + + if ( (this->m3u.size > 0) && (n < this->m3u.size) ) { + struct entry_t* entry = &this->m3u.entries [n]; + length = entry->length; + } + + if ( length <= 0 ) + length = 120 * 1000; /* 2 minutes */ + + return length; +} + +void Track_set_fade( struct Ay_Emu *this, int start_msec, int length_msec ) +{ + track_set_fade( &this->track_filter, msec_to_samples( start_msec, this->sample_rate ), + length_msec * this->sample_rate / (1000 / stereo) ); +} + +blargg_err_t Ay_play( struct Ay_Emu *this, int out_count, sample_t* out ) +{ + require( this->current_track >= 0 ); + require( out_count % stereo == 0 ); + return track_play( &this->track_filter, out_count, out ); +} + +blargg_err_t play_( void *emu, int count, sample_t* out ) +{ + struct Ay_Emu* this = (struct Ay_Emu*) emu; + + int remain = count; + while ( remain ) + { + Buffer_disable_immediate_removal( &this->stereo_buf ); + remain -= Buffer_read_samples( &this->stereo_buf, &out [count - remain], remain ); + if ( remain ) + { + if ( this->buf_changed_count != Buffer_channels_changed_count( &this->stereo_buf ) ) + { + this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf ); + + // Remute voices + Sound_mute_voices( this, this->mute_mask_ ); + } + int msec = Buffer_length( &this->stereo_buf ); + blip_time_t clocks_emulated = msec * this->clock_rate_ / 1000 - 100; + RETURN_ERR( run_clocks( this, &clocks_emulated, msec ) ); + assert( clocks_emulated ); + Buffer_end_frame( &this->stereo_buf, clocks_emulated ); + } + } + return 0; +} diff --git a/apps/codecs/libgme/blargg_config.h b/apps/codecs/libgme/blargg_config.h index 6490c15..398913d 100644 --- a/apps/codecs/libgme/blargg_config.h +++ b/apps/codecs/libgme/blargg_config.h @@ -1,42 +1,42 @@ -// Library configuration. Modify this file as necessary.
-
-#ifndef BLARGG_CONFIG_H
-#define BLARGG_CONFIG_H
-
-// Uncomment to enable platform-specific optimizations
-//#define BLARGG_NONPORTABLE 1
-
-// Uncomment if automatic byte-order determination doesn't work
-#ifdef ROCKBOX_BIG_ENDIAN
- #define BLARGG_BIG_ENDIAN 1
-#endif
-
-// Uncomment if you get errors in the bool section of blargg_common.h
-#define BLARGG_COMPILER_HAS_BOOL 1
-
-// Uncomment to use fast gb apu implementation
-// #define GB_APU_FAST 1
-
-// Uncomment to remove agb emulation support
-// #define GB_APU_NO_AGB 1
-
-// Uncomment to emulate only nes apu
-// #define NSF_EMU_APU_ONLY 1
-
-// Uncomment to remove vrc7 apu support
-// #define NSF_EMU_NO_VRC7 1
-
-// Uncomment to remove fmopl apu support
-// #define KSS_EMU_NO_FMOPL 1
-
-// To handle undefined reference to assert
-#define NDEBUG 1
-
-// Use standard config.h if present
-#define HAVE_CONFIG_H 1
-
-#ifdef HAVE_CONFIG_H
- #include "config.h"
-#endif
-
-#endif
+// Library configuration. Modify this file as necessary. + +#ifndef BLARGG_CONFIG_H +#define BLARGG_CONFIG_H + +// Uncomment to enable platform-specific optimizations +//#define BLARGG_NONPORTABLE 1 + +// Uncomment if automatic byte-order determination doesn't work +#ifdef ROCKBOX_BIG_ENDIAN + #define BLARGG_BIG_ENDIAN 1 +#endif + +// Uncomment if you get errors in the bool section of blargg_common.h +#define BLARGG_COMPILER_HAS_BOOL 1 + +// Uncomment to use fast gb apu implementation +// #define GB_APU_FAST 1 + +// Uncomment to remove agb emulation support +// #define GB_APU_NO_AGB 1 + +// Uncomment to emulate only nes apu +// #define NSF_EMU_APU_ONLY 1 + +// Uncomment to remove vrc7 apu support +// #define NSF_EMU_NO_VRC7 1 + +// Uncomment to remove fmopl apu support +// #define KSS_EMU_NO_FMOPL 1 + +// To handle undefined reference to assert +#define NDEBUG 1 + +// Use standard config.h if present +#define HAVE_CONFIG_H 1 + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#endif diff --git a/apps/codecs/libgme/emu2413.c b/apps/codecs/libgme/emu2413.c index a4637ce..0107582 100644 --- a/apps/codecs/libgme/emu2413.c +++ b/apps/codecs/libgme/emu2413.c @@ -1,1981 +1,1981 @@ -/***********************************************************************************
-
- emu2413.c -- YM2413 emulator written by Mitsutaka Okazaki 2001
-
- 2001 01-08 : Version 0.10 -- 1st version.
- 2001 01-15 : Version 0.20 -- semi-public version.
- 2001 01-16 : Version 0.30 -- 1st public version.
- 2001 01-17 : Version 0.31 -- Fixed bassdrum problem.
- : Version 0.32 -- LPF implemented.
- 2001 01-18 : Version 0.33 -- Fixed the drum problem, refine the mix-down method.
- -- Fixed the LFO bug.
- 2001 01-24 : Version 0.35 -- Fixed the drum problem,
- support undocumented EG behavior.
- 2001 02-02 : Version 0.38 -- Improved the performance.
- Fixed the hi-hat and cymbal model.
- Fixed the default percussive datas.
- Noise reduction.
- Fixed the feedback problem.
- 2001 03-03 : Version 0.39 -- Fixed some drum bugs.
- Improved the performance.
- 2001 03-04 : Version 0.40 -- Improved the feedback.
- Change the default table size.
- Clock and Rate can be changed during play.
- 2001 06-24 : Version 0.50 -- Improved the hi-hat and the cymbal tone.
- Added VRC7 patch (OPLL_reset_patch is changed).
- Fixed OPLL_reset() bug.
- Added OPLL_setMask, OPLL_getMask and OPLL_toggleMask.
- Added OPLL_writeIO.
- 2001 09-28 : Version 0.51 -- Removed the noise table.
- 2002 01-28 : Version 0.52 -- Added Stereo mode.
- 2002 02-07 : Version 0.53 -- Fixed some drum bugs.
- 2002 02-20 : Version 0.54 -- Added the best quality mode.
- 2002 03-02 : Version 0.55 -- Removed OPLL_init & OPLL_close.
- 2002 05-30 : Version 0.60 -- Fixed HH&CYM generator and all voice datas.
- 2004 04-10 : Version 0.61 -- Added YMF281B tone (defined by Chabin).
-
- 2011 03-22 : --------------- Modified by gama to use precalculated tables.
-
- References:
- fmopl.c -- 1999,2000 written by Tatsuyuki Satoh (MAME development).
- fmopl.c(fixed) -- (C) 2002 Jarek Burczynski.
- s_opl.c -- 2001 written by Mamiya (NEZplug development).
- fmgen.cpp -- 1999,2000 written by cisc.
- fmpac.ill -- 2000 created by NARUTO.
- MSX-Datapack
- YMU757 data sheet
- YM2143 data sheet
-
-**************************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include "emu2413.h"
-
-#include "emutables.h"
-#if !defined(ROCKBOX)
- #define EMU2413_CALCUL_TABLES
-#else
- #define EMU2413_COMPACTION
- #include "emutables.h"
-#endif
-
-#if defined(EMU2413_COMPACTION) && !defined(ROCKBOX)
-#define OPLL_TONE_NUM 1
-static unsigned char default_inst[OPLL_TONE_NUM][(16 + 3) * 16] = {
- {
-#include "2413tone.h"
- }
-};
-#else
-#define OPLL_TONE_NUM 3
-static unsigned char default_inst[OPLL_TONE_NUM][(16 + 3) * 16] = {
- {
-#include "2413tone.h"
- },
- {
-#include "vrc7tone.h"
- },
- {
-#include "281btone.h"
- }
-};
-#endif
-
-/* Size of Sintable ( 8 -- 18 can be used. 9 recommended.) */
-#define PG_BITS 9
-#define PG_WIDTH (1<<PG_BITS)
-
-/* Phase increment counter */
-#define DP_BITS 18
-#define DP_WIDTH (1<<DP_BITS)
-#define DP_BASE_BITS (DP_BITS - PG_BITS)
-
-/* Dynamic range (Accuracy of sin table) */
-#define DB_PREC 48
-#define DB_BITS 8
-#define DB_STEP ((double)DB_PREC/(1<<DB_BITS))
-#define DB_MUTE (1<<DB_BITS)
-
-/* Dynamic range of envelope */
-#define EG_STEP 0.375
-#define EG_BITS 7
-#define EG_MUTE (1<<EG_BITS)
-
-/* Dynamic range of total level */
-#define TL_STEP 0.75
-#define TL_BITS 6
-#define TL_MUTE (1<<TL_BITS)
-
-/* Dynamic range of sustine level */
-#define SL_STEP 3.0
-#define SL_BITS 4
-#define SL_MUTE (1<<SL_BITS)
-
-#define EG2DB(d) ((d)*(e_int32)(EG_STEP/DB_STEP))
-#define TL2EG(d) ((d)*(e_int32)(TL_STEP/EG_STEP))
-#define SL2EG(d) ((d)*(e_int32)(SL_STEP/EG_STEP))
-
-#define DB_POS(x) (x*DB_MUTE/DB_PREC)
-#define DB_NEG(x) (DB_MUTE+DB_MUTE+x*DB_MUTE/DB_PREC)
-
-/* Bits for liner value */
-#define DB2LIN_AMP_BITS 8
-#define SLOT_AMP_BITS (DB2LIN_AMP_BITS)
-
-/* Bits for envelope phase incremental counter */
-#define EG_DP_BITS 22
-#define EG_DP_WIDTH (1<<EG_DP_BITS)
-
-/* Bits for Pitch and Amp modulator */
-#define PM_PG_BITS 8
-#define PM_PG_WIDTH (1<<PM_PG_BITS)
-#define PM_DP_BITS 16
-#define PM_DP_WIDTH (1<<PM_DP_BITS)
-#define AM_PG_BITS 8
-#define AM_PG_WIDTH (1<<AM_PG_BITS)
-#define AM_DP_BITS 16
-#define AM_DP_WIDTH (1<<AM_DP_BITS)
-
-/* PM table is calcurated by PM_AMP * pow(2,PM_DEPTH*sin(x)/1200) */
-#define PM_AMP_BITS 8
-#define PM_AMP (1<<PM_AMP_BITS)
-
-/* PM speed(Hz) and depth(cent) */
-#define PM_SPEED 6.4
-#define PM_DEPTH 13.75
-
-/* AM speed(Hz) and depth(dB) */
-#define AM_SPEED 3.6413
-#define AM_DEPTH 4.875
-
-/* Cut the lower b bit(s) off. */
-#define HIGHBITS(c,b) ((c)>>(b))
-
-/* Leave the lower b bit(s). */
-#define LOWBITS(c,b) ((c)&((1<<(b))-1))
-
-/* Expand x which is s bits to d bits. */
-#define EXPAND_BITS(x,s,d) ((x)<<((d)-(s)))
-
-/* Expand x which is s bits to d bits and fill expanded bits '1' */
-#define EXPAND_BITS_X(x,s,d) (((x)<<((d)-(s)))|((1<<((d)-(s)))-1))
-
-/* Adjust envelope speed which depends on sampling rate. */
-#define RATE_ADJUST(x) (rate==49716?(e_uint32)x:(e_uint32)(((long long)(x)*clk/rate+36)/72))
-
-#define MOD(o,x) (&(o)->slot[(x)<<1])
-#define CAR(o,x) (&(o)->slot[((x)<<1)|1])
-
-#define BIT(s,b) (((s)>>(b))&1)
-
-/* Input clock */
-static e_uint32 clk = 844451141;
-/* Sampling rate */
-static e_uint32 rate = 3354932;
-
-/* WaveTable for each envelope amp */
-static e_uint16 fullsintable[PG_WIDTH];
-static e_uint16 halfsintable[PG_WIDTH];
-
-static e_uint16 *waveform[2] = { fullsintable, halfsintable };
-
-/* LFO Table */
-#ifdef EMU2413_CALCUL_TABLES
- static e_int32 pmtable[PM_PG_WIDTH];
- static e_int32 amtable[AM_PG_WIDTH];
- #define PMTABLE(x) pmtable[x]
- #define AMTABLE(x) amtable[x]
-#else
- #define PMTABLE(x) (e_int32)pm_coeff[x]
- #if (PM_PG_WIDTH != 256)
- #error PM_PG_WIDTH must be set to 256 if EMU2413_CALCUL_TABLES is not defined
- #endif
- #define AMTABLE(x) (e_int32)am_coeff[x]
- #if (AM_PG_WIDTH != 256)
- #error AM_PG_WIDTH must be set to 256 if EMU2413_CALCUL_TABLES is not defined
- #endif
-#endif
-
-/* Phase delta for LFO */
-static e_uint32 pm_dphase;
-static e_uint32 am_dphase;
-
-/* dB to Liner table */
-static e_int16 DB2LIN_TABLE[(DB_MUTE + DB_MUTE) * 2];
-
-/* Liner to Log curve conversion table (for Attack rate). */
-#ifdef EMU2413_CALCUL_TABLES
- static e_uint16 ar_adjust_table[1 << EG_BITS];
- #define AR_ADJUST_TABLE(x) ar_adjust_table[x]
-#else
- #define AR_ADJUST_TABLE(x) ar_adjust_coeff[x]
- #if (EG_BITS != 7)
- #error EG_BITS must be set to 7 if EMU2413_CALCUL_TABLES is not defined
- #endif
-#endif
-
-/* Empty voice data */
-static OPLL_PATCH null_patch = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-/* Basic voice Data */
-static OPLL_PATCH default_patch[OPLL_TONE_NUM][(16 + 3) * 2];
-
-/* Definition of envelope mode */
-enum OPLL_EG_STATE
-{ READY, ATTACK, DECAY, SUSHOLD, SUSTINE, RELEASE, SETTLE, FINISH };
-
-/* Phase incr table for Attack */
-static e_uint32 dphaseARTable[16][16];
-/* Phase incr table for Decay and Release */
-static e_uint32 dphaseDRTable[16][16];
-
-/* KSL + TL Table */
-e_uint8 tllTable[16][8][1 << TL_BITS][4];
-static e_int32 rksTable[2][8][2];
-
-/* We may not have too much SRAM in rockbox */
-#if !defined(ROCKBOX)
-/* Phase incr table for PG */
-static e_uint32 dphaseTable[512][8][16];
-#endif
-
-/***************************************************
-
- Create tables
-
-****************************************************/
-#ifdef EMU2413_CALCUL_TABLES
-INLINE static e_int32
-Min (e_int32 i, e_int32 j)
-{
- if (i < j)
- return i;
- else
- return j;
-}
-
-/* Table for AR to LogCurve. */
-static void
-makeAdjustTable (void)
-{
- e_int32 i;
-
- ar_adjust_table[0] = (1 << EG_BITS) - 1;
- for (i = 1; i < (1<<EG_BITS); i++)
- ar_adjust_table[i] = (e_uint16) ((double) (1<<EG_BITS)-1 - ((1<<EG_BITS)-1)*log(i)/log(127));
-}
-#endif
-
-/* Table for dB(0 -- (1<<DB_BITS)-1) to Liner(0 -- DB2LIN_AMP_WIDTH) */
-static void
-makeDB2LinTable (void)
-{
- e_int32 i;
- for (i = 0; i < DB_MUTE + DB_MUTE; i++)
- {
- #ifdef EMU2413_CALCUL_TABLES
- DB2LIN_TABLE[i] = (e_int16) ((double) ((1 << DB2LIN_AMP_BITS) - 1) * pow (10, -(double) i * DB_STEP / 20));
- #else
- DB2LIN_TABLE[i] = db2lin_coeff[i];
- #endif
- if (i >= DB_MUTE) DB2LIN_TABLE[i] = 0;
- DB2LIN_TABLE[i + DB_MUTE + DB_MUTE] = (e_int16) (-DB2LIN_TABLE[i]);
- }
-}
-
-#ifdef EMU2413_CALCUL_TABLES
-/* Liner(+0.0 - +1.0) to dB((1<<DB_BITS) - 1 -- 0) */
-static e_int32
-lin2db (double d)
-{
- if (d == 0)
- return (DB_MUTE - 1);
- else
- return Min (-(e_int32) (20.0 * log10 (d) / DB_STEP), DB_MUTE-1); /* 0 -- 127 */
-}
-#endif
-
-/* Sin Table */
-static void
-makeSinTable (void)
-{
- e_int32 i;
-
- for (i = 0; i < PG_WIDTH / 4; i++)
- #ifdef EMU2413_CALCUL_TABLES
- fullsintable[i] = (e_uint32) lin2db (sin (2.0 * PI * i / PG_WIDTH) );
- #else
- fullsintable[i] = sin_coeff[i];
- #endif
-
- for (i = 0; i < PG_WIDTH / 4; i++)
- {
- fullsintable[PG_WIDTH / 2 - 1 - i] = fullsintable[i];
- }
-
- for (i = 0; i < PG_WIDTH / 2; i++)
- {
- fullsintable[PG_WIDTH / 2 + i] = (e_uint32) (DB_MUTE + DB_MUTE + fullsintable[i]);
- }
-
- for (i = 0; i < PG_WIDTH / 2; i++)
- halfsintable[i] = fullsintable[i];
- for (i = PG_WIDTH / 2; i < PG_WIDTH; i++)
- halfsintable[i] = fullsintable[0];
-}
-
-#ifdef EMU2413_CALCUL_TABLES
-static double saw(double phase)
-{
- if(phase <= PI/2)
- return phase * 2 / PI ;
- else if(phase <= PI*3/2)
- return 2.0 - ( phase * 2 / PI );
- else
- return -4.0 + phase * 2 / PI;
-}
-
-/* Table for Pitch Modulator */
-static void
-makePmTable (void)
-{
- e_int32 i;
-
- for (i = 0; i < PM_PG_WIDTH; i++)
- /* pmtable[i] = (e_int32) ((double) PM_AMP * pow (2, (double) PM_DEPTH * sin (2.0 * PI * i / PM_PG_WIDTH) / 1200)); */
- pmtable[i] = (e_int32) ((double) PM_AMP * pow (2, (double) PM_DEPTH * saw (2.0 * PI * i / PM_PG_WIDTH) / 1200));
-}
-
-/* Table for Amp Modulator */
-static void
-makeAmTable (void)
-{
- e_int32 i;
-
- for (i = 0; i < AM_PG_WIDTH; i++)
- /* amtable[i] = (e_int32) ((double) AM_DEPTH / 2 / DB_STEP * (1.0 + sin (2.0 * PI * i / PM_PG_WIDTH))); */
- amtable[i] = (e_int32) ((double) AM_DEPTH / 2 / DB_STEP * (1.0 + saw (2.0 * PI * i / PM_PG_WIDTH)));
-}
-#endif
-
-#if !defined(ROCKBOX)
-/* Phase increment counter table */
-static void
-makeDphaseTable (void)
-{
- e_uint32 fnum, block, ML;
- e_uint32 mltable[16] =
- { 1, 1 * 2, 2 * 2, 3 * 2, 4 * 2, 5 * 2, 6 * 2, 7 * 2, 8 * 2, 9 * 2, 10 * 2, 10 * 2, 12 * 2, 12 * 2, 15 * 2, 15 * 2 };
-
- for (fnum = 0; fnum < 512; fnum++)
- for (block = 0; block < 8; block++)
- for (ML = 0; ML < 16; ML++)
- dphaseTable[fnum][block][ML] = RATE_ADJUST (((fnum * mltable[ML]) << block) >> (20 - DP_BITS));
-}
-#endif
-
-static void
-makeTllTable (void)
-{
-/* Multiplication owith 8 to have an integer result. This allows to remove floating point operation. */
-#define dB2(x) (int)((x)*2*8)
-
- static int kltable[16] = {
- dB2 ( 0.000), dB2 ( 9.000), dB2 (12.000), dB2 (13.875), dB2 (15.000), dB2 (16.125), dB2 (16.875), dB2 (17.625),
- dB2 (18.000), dB2 (18.750), dB2 (19.125), dB2 (19.500), dB2 (19.875), dB2 (20.250), dB2 (20.625), dB2 (21.000)
- };
-
- e_int32 tmp;
- e_int32 fnum, block, TL, KL;
-
- for (fnum = 0; fnum < 16; fnum++)
- for (block = 0; block < 8; block++)
- for (TL = 0; TL < 64; TL++)
- for (KL = 0; KL < 4; KL++)
- {
- if (KL == 0)
- {
- tllTable[fnum][block][TL][KL] = TL2EG (TL);
- }
- else
- {
- tmp = (e_int32) ((kltable[fnum] - dB2 (3.000) * (7 - block))/8);
- if (tmp <= 0)
- tllTable[fnum][block][TL][KL] = TL2EG (TL);
- else
- /* tllTable[fnum][block][TL][KL] = (e_uint32) ((tmp >> (3 - KL)) / EG_STEP) + TL2EG (TL); */
- tllTable[fnum][block][TL][KL] = (e_uint32) ((tmp << KL) / (int)(EG_STEP*8)) + TL2EG (TL);
- }
- }
-}
-
-#ifdef USE_SPEC_ENV_SPEED
-static double attacktime[16][4] = {
- {0, 0, 0, 0},
- {1730.15, 1400.60, 1153.43, 988.66},
- {865.08, 700.30, 576.72, 494.33},
- {432.54, 350.15, 288.36, 247.16},
- {216.27, 175.07, 144.18, 123.58},
- {108.13, 87.54, 72.09, 61.79},
- {54.07, 43.77, 36.04, 30.90},
- {27.03, 21.88, 18.02, 15.45},
- {13.52, 10.94, 9.01, 7.72},
- {6.76, 5.47, 4.51, 3.86},
- {3.38, 2.74, 2.25, 1.93},
- {1.69, 1.37, 1.13, 0.97},
- {0.84, 0.70, 0.60, 0.54},
- {0.50, 0.42, 0.34, 0.30},
- {0.28, 0.22, 0.18, 0.14},
- {0.00, 0.00, 0.00, 0.00}
-};
-
-static double decaytime[16][4] = {
- {0, 0, 0, 0},
- {20926.60, 16807.20, 14006.00, 12028.60},
- {10463.30, 8403.58, 7002.98, 6014.32},
- {5231.64, 4201.79, 3501.49, 3007.16},
- {2615.82, 2100.89, 1750.75, 1503.58},
- {1307.91, 1050.45, 875.37, 751.79},
- {653.95, 525.22, 437.69, 375.90},
- {326.98, 262.61, 218.84, 187.95},
- {163.49, 131.31, 109.42, 93.97},
- {81.74, 65.65, 54.71, 46.99},
- {40.87, 32.83, 27.36, 23.49},
- {20.44, 16.41, 13.68, 11.75},
- {10.22, 8.21, 6.84, 5.87},
- {5.11, 4.10, 3.42, 2.94},
- {2.55, 2.05, 1.71, 1.47},
- {1.27, 1.27, 1.27, 1.27}
-};
-#endif
-
-/* Rate Table for Attack */
-static void
-makeDphaseARTable (void)
-{
- e_int32 AR, Rks, RM, RL;
-
-#ifdef USE_SPEC_ENV_SPEED
- e_uint32 attacktable[16][4];
-
- for (RM = 0; RM < 16; RM++)
- for (RL = 0; RL < 4; RL++)
- {
- if (RM == 0)
- attacktable[RM][RL] = 0;
- else if (RM == 15)
- attacktable[RM][RL] = EG_DP_WIDTH;
- else
- attacktable[RM][RL] = (e_uint32) ((double) (1 << EG_DP_BITS) / (attacktime[RM][RL] * 3579545 / 72000));
-
- }
-#endif
-
- for (AR = 0; AR < 16; AR++)
- for (Rks = 0; Rks < 16; Rks++)
- {
- RM = AR + (Rks >> 2);
- RL = Rks & 3;
- if (RM > 15)
- RM = 15;
- switch (AR)
- {
- case 0:
- dphaseARTable[AR][Rks] = 0;
- break;
- case 15:
- dphaseARTable[AR][Rks] = 0;/*EG_DP_WIDTH;*/
- break;
- default:
-#ifdef USE_SPEC_ENV_SPEED
- dphaseARTable[AR][Rks] = RATE_ADJUST (attacktable[RM][RL]);
-#else
- dphaseARTable[AR][Rks] = RATE_ADJUST ((3 * (RL + 4) << (RM + 1)));
-#endif
- break;
- }
- }
-}
-
-/* Rate Table for Decay and Release */
-static void
-makeDphaseDRTable (void)
-{
- e_int32 DR, Rks, RM, RL;
-
-#ifdef USE_SPEC_ENV_SPEED
- e_uint32 decaytable[16][4];
-
- for (RM = 0; RM < 16; RM++)
- for (RL = 0; RL < 4; RL++)
- if (RM == 0)
- decaytable[RM][RL] = 0;
- else
- decaytable[RM][RL] = (e_uint32) ((double) (1 << EG_DP_BITS) / (decaytime[RM][RL] * 3579545 / 72000));
-#endif
-
- for (DR = 0; DR < 16; DR++)
- for (Rks = 0; Rks < 16; Rks++)
- {
- RM = DR + (Rks >> 2);
- RL = Rks & 3;
- if (RM > 15)
- RM = 15;
- switch (DR)
- {
- case 0:
- dphaseDRTable[DR][Rks] = 0;
- break;
- default:
-#ifdef USE_SPEC_ENV_SPEED
- dphaseDRTable[DR][Rks] = RATE_ADJUST (decaytable[RM][RL]);
-#else
- dphaseDRTable[DR][Rks] = RATE_ADJUST ((RL + 4) << (RM - 1));
-#endif
- break;
- }
- }
-}
-
-static void
-makeRksTable (void)
-{
-
- e_int32 fnum8, block, KR;
-
- for (fnum8 = 0; fnum8 < 2; fnum8++)
- for (block = 0; block < 8; block++)
- for (KR = 0; KR < 2; KR++)
- {
- if (KR != 0)
- rksTable[fnum8][block][KR] = (block << 1) + fnum8;
- else
- rksTable[fnum8][block][KR] = block >> 1;
- }
-}
-
-void
-OPLL_dump2patch (const e_uint8 * dump, OPLL_PATCH * patch)
-{
- patch[0].AM = (dump[0] >> 7) & 1;
- patch[1].AM = (dump[1] >> 7) & 1;
- patch[0].PM = (dump[0] >> 6) & 1;
- patch[1].PM = (dump[1] >> 6) & 1;
- patch[0].EG = (dump[0] >> 5) & 1;
- patch[1].EG = (dump[1] >> 5) & 1;
- patch[0].KR = (dump[0] >> 4) & 1;
- patch[1].KR = (dump[1] >> 4) & 1;
- patch[0].ML = (dump[0]) & 15;
- patch[1].ML = (dump[1]) & 15;
- patch[0].KL = (dump[2] >> 6) & 3;
- patch[1].KL = (dump[3] >> 6) & 3;
- patch[0].TL = (dump[2]) & 63;
- patch[0].FB = (dump[3]) & 7;
- patch[0].WF = (dump[3] >> 3) & 1;
- patch[1].WF = (dump[3] >> 4) & 1;
- patch[0].AR = (dump[4] >> 4) & 15;
- patch[1].AR = (dump[5] >> 4) & 15;
- patch[0].DR = (dump[4]) & 15;
- patch[1].DR = (dump[5]) & 15;
- patch[0].SL = (dump[6] >> 4) & 15;
- patch[1].SL = (dump[7] >> 4) & 15;
- patch[0].RR = (dump[6]) & 15;
- patch[1].RR = (dump[7]) & 15;
-}
-
-void
-OPLL_getDefaultPatch (e_int32 type, e_int32 num, OPLL_PATCH * patch)
-{
- OPLL_dump2patch (default_inst[type] + num * 16, patch);
-}
-
-static void
-makeDefaultPatch ( void )
-{
- e_int32 i, j;
-
- for (i = 0; i < OPLL_TONE_NUM; i++)
- for (j = 0; j < 19; j++)
- OPLL_getDefaultPatch (i, j, &default_patch[i][j * 2]);
-
-}
-
-void
-OPLL_setPatch (OPLL * opll, const e_uint8 * dump)
-{
- OPLL_PATCH patch[2];
- int i;
-
- for (i = 0; i < 19; i++)
- {
- OPLL_dump2patch (dump + i * 16, patch);
- memcpy (&opll->patch[i*2+0], &patch[0], sizeof (OPLL_PATCH));
- memcpy (&opll->patch[i*2+1], &patch[1], sizeof (OPLL_PATCH));
- }
-}
-
-void
-OPLL_patch2dump (const OPLL_PATCH * patch, e_uint8 * dump)
-{
- dump[0] = (e_uint8) ((patch[0].AM << 7) + (patch[0].PM << 6) + (patch[0].EG << 5) + (patch[0].KR << 4) + patch[0].ML);
- dump[1] = (e_uint8) ((patch[1].AM << 7) + (patch[1].PM << 6) + (patch[1].EG << 5) + (patch[1].KR << 4) + patch[1].ML);
- dump[2] = (e_uint8) ((patch[0].KL << 6) + patch[0].TL);
- dump[3] = (e_uint8) ((patch[1].KL << 6) + (patch[1].WF << 4) + (patch[0].WF << 3) + patch[0].FB);
- dump[4] = (e_uint8) ((patch[0].AR << 4) + patch[0].DR);
- dump[5] = (e_uint8) ((patch[1].AR << 4) + patch[1].DR);
- dump[6] = (e_uint8) ((patch[0].SL << 4) + patch[0].RR);
- dump[7] = (e_uint8) ((patch[1].SL << 4) + patch[1].RR);
- dump[8] = 0;
- dump[9] = 0;
- dump[10] = 0;
- dump[11] = 0;
- dump[12] = 0;
- dump[13] = 0;
- dump[14] = 0;
- dump[15] = 0;
-}
-
-/************************************************************
-
- Calc Parameters
-
-************************************************************/
-
-INLINE static e_uint32
-calc_eg_dphase (OPLL_SLOT * slot)
-{
-
- switch (slot->eg_mode)
- {
- case ATTACK:
- return dphaseARTable[slot->patch->AR][slot->rks];
-
- case DECAY:
- return dphaseDRTable[slot->patch->DR][slot->rks];
-
- case SUSHOLD:
- return 0;
-
- case SUSTINE:
- return dphaseDRTable[slot->patch->RR][slot->rks];
-
- case RELEASE:
- if (slot->sustine)
- return dphaseDRTable[5][slot->rks];
- else if (slot->patch->EG)
- return dphaseDRTable[slot->patch->RR][slot->rks];
- else
- return dphaseDRTable[7][slot->rks];
-
- case SETTLE:
- return dphaseDRTable[15][0];
-
- case FINISH:
- return 0;
-
- default:
- return 0;
- }
-}
-
-/*************************************************************
-
- OPLL internal interfaces
-
-*************************************************************/
-#define SLOT_BD1 12
-#define SLOT_BD2 13
-#define SLOT_HH 14
-#define SLOT_SD 15
-#define SLOT_TOM 16
-#define SLOT_CYM 17
-
-/* We will set this dinamically, but not sure if this affects playback */
-#if defined(ROCKBOX)
-INLINE static void
-UPDATE_PG(OPLL_SLOT * slot)
-{
- static const e_uint32 mltable[16] =
- { 1, 1 * 2, 2 * 2, 3 * 2, 4 * 2, 5 * 2, 6 * 2, 7 * 2, 8 * 2, 9 * 2, 10 * 2, 10 * 2, 12 * 2, 12 * 2, 15 * 2, 15 * 2 };
-
- slot->dphase = RATE_ADJUST (((slot->fnum * mltable[slot->patch->ML]) << slot->block) >> (20 - DP_BITS));
-}
-#else
-#define UPDATE_PG(S) (S)->dphase = dphaseTable[(S)->fnum][(S)->block][(S)->patch->ML]
-#endif
-
-#define UPDATE_TLL(S)\
-(((S)->type==0)?\
-((S)->tll = tllTable[((S)->fnum)>>5][(S)->block][(S)->patch->TL][(S)->patch->KL]):\
-((S)->tll = tllTable[((S)->fnum)>>5][(S)->block][(S)->volume][(S)->patch->KL]))
-#define UPDATE_RKS(S) (S)->rks = rksTable[((S)->fnum)>>8][(S)->block][(S)->patch->KR]
-#define UPDATE_WF(S) (S)->sintbl = waveform[(S)->patch->WF]
-#define UPDATE_EG(S) (S)->eg_dphase = calc_eg_dphase(S)
-#define UPDATE_ALL(S)\
- UPDATE_PG(S);\
- UPDATE_TLL(S);\
- UPDATE_RKS(S);\
- UPDATE_WF(S); \
- UPDATE_EG(S) /* EG should be updated last. */
-
-
-/* Slot key on */
-INLINE static void
-slotOn (OPLL_SLOT * slot)
-{
- slot->eg_mode = ATTACK;
- slot->eg_phase = 0;
- slot->phase = 0;
- UPDATE_EG(slot);
-}
-
-/* Slot key on without reseting the phase */
-INLINE static void
-slotOn2 (OPLL_SLOT * slot)
-{
- slot->eg_mode = ATTACK;
- slot->eg_phase = 0;
- UPDATE_EG(slot);
-}
-
-/* Slot key off */
-INLINE static void
-slotOff (OPLL_SLOT * slot)
-{
- if (slot->eg_mode == ATTACK)
- slot->eg_phase = EXPAND_BITS (AR_ADJUST_TABLE(HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS)), EG_BITS, EG_DP_BITS);
- slot->eg_mode = RELEASE;
- UPDATE_EG(slot);
-}
-
-/* Channel key on */
-INLINE static void
-keyOn (OPLL * opll, e_int32 i)
-{
- if (!opll->slot_on_flag[i * 2])
- slotOn (MOD(opll,i));
- if (!opll->slot_on_flag[i * 2 + 1])
- slotOn (CAR(opll,i));
- opll->key_status[i] = 1;
-}
-
-/* Channel key off */
-INLINE static void
-keyOff (OPLL * opll, e_int32 i)
-{
- if (opll->slot_on_flag[i * 2 + 1])
- slotOff (CAR(opll,i));
- opll->key_status[i] = 0;
-}
-
-INLINE static void
-keyOn_BD (OPLL * opll)
-{
- keyOn (opll, 6);
-}
-INLINE static void
-keyOn_SD (OPLL * opll)
-{
- if (!opll->slot_on_flag[SLOT_SD])
- slotOn (CAR(opll,7));
-}
-INLINE static void
-keyOn_TOM (OPLL * opll)
-{
- if (!opll->slot_on_flag[SLOT_TOM])
- slotOn (MOD(opll,8));
-}
-INLINE static void
-keyOn_HH (OPLL * opll)
-{
- if (!opll->slot_on_flag[SLOT_HH])
- slotOn2 (MOD(opll,7));
-}
-INLINE static void
-keyOn_CYM (OPLL * opll)
-{
- if (!opll->slot_on_flag[SLOT_CYM])
- slotOn2 (CAR(opll,8));
-}
-
-/* Drum key off */
-INLINE static void
-keyOff_BD (OPLL * opll)
-{
- keyOff (opll, 6);
-}
-INLINE static void
-keyOff_SD (OPLL * opll)
-{
- if (opll->slot_on_flag[SLOT_SD])
- slotOff (CAR(opll,7));
-}
-INLINE static void
-keyOff_TOM (OPLL * opll)
-{
- if (opll->slot_on_flag[SLOT_TOM])
- slotOff (MOD(opll,8));
-}
-INLINE static void
-keyOff_HH (OPLL * opll)
-{
- if (opll->slot_on_flag[SLOT_HH])
- slotOff (MOD(opll,7));
-}
-INLINE static void
-keyOff_CYM (OPLL * opll)
-{
- if (opll->slot_on_flag[SLOT_CYM])
- slotOff (CAR(opll,8));
-}
-
-/* Change a voice */
-INLINE static void
-setPatch (OPLL * opll, e_int32 i, e_int32 num)
-{
- opll->patch_number[i] = num;
- MOD(opll,i)->patch = &opll->patch[num * 2 + 0];
- CAR(opll,i)->patch = &opll->patch[num * 2 + 1];
-}
-
-/* Change a rhythm voice */
-INLINE static void
-setSlotPatch (OPLL_SLOT * slot, OPLL_PATCH * patch)
-{
- slot->patch = patch;
-}
-
-/* Set sustine parameter */
-INLINE static void
-setSustine (OPLL * opll, e_int32 c, e_int32 sustine)
-{
- CAR(opll,c)->sustine = sustine;
- if (MOD(opll,c)->type)
- MOD(opll,c)->sustine = sustine;
-}
-
-/* Volume : 6bit ( Volume register << 2 ) */
-INLINE static void
-setVolume (OPLL * opll, e_int32 c, e_int32 volume)
-{
- CAR(opll,c)->volume = volume;
-}
-
-INLINE static void
-setSlotVolume (OPLL_SLOT * slot, e_int32 volume)
-{
- slot->volume = volume;
-}
-
-/* Set F-Number ( fnum : 9bit ) */
-INLINE static void
-setFnumber (OPLL * opll, e_int32 c, e_int32 fnum)
-{
- CAR(opll,c)->fnum = fnum;
- MOD(opll,c)->fnum = fnum;
-}
-
-/* Set Block data (block : 3bit ) */
-INLINE static void
-setBlock (OPLL * opll, e_int32 c, e_int32 block)
-{
- CAR(opll,c)->block = block;
- MOD(opll,c)->block = block;
-}
-
-/* Change Rhythm Mode */
-INLINE static void
-update_rhythm_mode (OPLL * opll)
-{
- if (opll->patch_number[6] & 0x10)
- {
- if (!(opll->slot_on_flag[SLOT_BD2] | (opll->reg[0x0e] & 32)))
- {
- opll->slot[SLOT_BD1].eg_mode = FINISH;
- opll->slot[SLOT_BD2].eg_mode = FINISH;
- setPatch (opll, 6, opll->reg[0x36] >> 4);
- }
- }
- else if (opll->reg[0x0e] & 32)
- {
- opll->patch_number[6] = 16;
- opll->slot[SLOT_BD1].eg_mode = FINISH;
- opll->slot[SLOT_BD2].eg_mode = FINISH;
- setSlotPatch (&opll->slot[SLOT_BD1], &opll->patch[16 * 2 + 0]);
- setSlotPatch (&opll->slot[SLOT_BD2], &opll->patch[16 * 2 + 1]);
- }
-
- if (opll->patch_number[7] & 0x10)
- {
- if (!((opll->slot_on_flag[SLOT_HH] && opll->slot_on_flag[SLOT_SD]) | (opll->reg[0x0e] & 32)))
- {
- opll->slot[SLOT_HH].type = 0;
- opll->slot[SLOT_HH].eg_mode = FINISH;
- opll->slot[SLOT_SD].eg_mode = FINISH;
- setPatch (opll, 7, opll->reg[0x37] >> 4);
- }
- }
- else if (opll->reg[0x0e] & 32)
- {
- opll->patch_number[7] = 17;
- opll->slot[SLOT_HH].type = 1;
- opll->slot[SLOT_HH].eg_mode = FINISH;
- opll->slot[SLOT_SD].eg_mode = FINISH;
- setSlotPatch (&opll->slot[SLOT_HH], &opll->patch[17 * 2 + 0]);
- setSlotPatch (&opll->slot[SLOT_SD], &opll->patch[17 * 2 + 1]);
- }
-
- if (opll->patch_number[8] & 0x10)
- {
- if (!((opll->slot_on_flag[SLOT_CYM] && opll->slot_on_flag[SLOT_TOM]) | (opll->reg[0x0e] & 32)))
- {
- opll->slot[SLOT_TOM].type = 0;
- opll->slot[SLOT_TOM].eg_mode = FINISH;
- opll->slot[SLOT_CYM].eg_mode = FINISH;
- setPatch (opll, 8, opll->reg[0x38] >> 4);
- }
- }
- else if (opll->reg[0x0e] & 32)
- {
- opll->patch_number[8] = 18;
- opll->slot[SLOT_TOM].type = 1;
- opll->slot[SLOT_TOM].eg_mode = FINISH;
- opll->slot[SLOT_CYM].eg_mode = FINISH;
- setSlotPatch (&opll->slot[SLOT_TOM], &opll->patch[18 * 2 + 0]);
- setSlotPatch (&opll->slot[SLOT_CYM], &opll->patch[18 * 2 + 1]);
- }
-}
-
-INLINE static void
-update_key_status (OPLL * opll)
-{
- int ch;
-
- for (ch = 0; ch < 9; ch++)
- opll->slot_on_flag[ch * 2] = opll->slot_on_flag[ch * 2 + 1] = (opll->reg[0x20 + ch]) & 0x10;
-
- if (opll->reg[0x0e] & 32)
- {
- opll->slot_on_flag[SLOT_BD1] |= (opll->reg[0x0e] & 0x10);
- opll->slot_on_flag[SLOT_BD2] |= (opll->reg[0x0e] & 0x10);
- opll->slot_on_flag[SLOT_SD] |= (opll->reg[0x0e] & 0x08);
- opll->slot_on_flag[SLOT_HH] |= (opll->reg[0x0e] & 0x01);
- opll->slot_on_flag[SLOT_TOM] |= (opll->reg[0x0e] & 0x04);
- opll->slot_on_flag[SLOT_CYM] |= (opll->reg[0x0e] & 0x02);
- }
-}
-
-void
-OPLL_copyPatch (OPLL * opll, e_int32 num, OPLL_PATCH * patch)
-{
- memcpy (&opll->patch[num], patch, sizeof (OPLL_PATCH));
-}
-
-/***********************************************************
-
- Initializing
-
-***********************************************************/
-
-static void
-OPLL_SLOT_reset (OPLL_SLOT * slot, int type)
-{
- slot->type = type;
- slot->sintbl = waveform[0];
- slot->phase = 0;
- slot->dphase = 0;
- slot->output[0] = 0;
- slot->output[1] = 0;
- slot->feedback = 0;
- slot->eg_mode = FINISH;
- slot->eg_phase = EG_DP_WIDTH;
- slot->eg_dphase = 0;
- slot->rks = 0;
- slot->tll = 0;
- slot->sustine = 0;
- slot->fnum = 0;
- slot->block = 0;
- slot->volume = 0;
- slot->pgout = 0;
- slot->egout = 0;
- slot->patch = &null_patch;
-}
-
-static void
-internal_refresh (void)
-{
-#if !defined(ROCKBOX)
- makeDphaseTable ();
-#endif
- makeDphaseARTable ();
- makeDphaseDRTable ();
- pm_dphase = (e_uint32) RATE_ADJUST ((int)(PM_SPEED * PM_DP_WIDTH) / (clk / 72));
- am_dphase = (e_uint32) RATE_ADJUST ((int)(AM_SPEED * AM_DP_WIDTH) / (clk / 72));
-}
-
-static void
-maketables (e_uint32 c, e_uint32 r)
-{
- if (c != clk)
- {
- clk = c;
-#ifdef EMU2413_CALCUL_TABLES
- makePmTable ();
- makeAmTable ();
- makeAdjustTable ();
-#endif
- makeDB2LinTable ();
- makeTllTable ();
- makeRksTable ();
- makeSinTable ();
- makeDefaultPatch ();
- }
-
- if (r != rate)
- {
- rate = r;
- internal_refresh ();
- }
-}
-
-void
-OPLL_new (OPLL *opll, e_uint32 clk, e_uint32 rate)
-{
- e_int32 i;
-
- maketables (clk, rate);
-
- memset(opll, 0, sizeof (OPLL));
- for (i = 0; i < 19 * 2; i++)
- memcpy(&opll->patch[i],&null_patch,sizeof(OPLL_PATCH));
-
- opll->mask = 0;
-
- OPLL_reset (opll);
- OPLL_reset_patch (opll, 0);
-}
-
-
-void
-OPLL_delete (OPLL * opll)
-{
- (void) opll;
-}
-
-
-/* Reset patch datas by system default. */
-void
-OPLL_reset_patch (OPLL * opll, e_int32 type)
-{
- e_int32 i;
-
- for (i = 0; i < 19 * 2; i++)
- OPLL_copyPatch (opll, i, &default_patch[type % OPLL_TONE_NUM][i]);
-}
-
-/* Reset whole of OPLL except patch datas. */
-void
-OPLL_reset (OPLL * opll)
-{
- e_int32 i;
-
- if (!opll)
- return;
-
- opll->adr = 0;
- opll->out = 0;
-
- opll->pm_phase = 0;
- opll->am_phase = 0;
-
- opll->noise_seed = 0xffff;
- opll->mask = 0;
-
- for (i = 0; i <18; i++)
- OPLL_SLOT_reset(&opll->slot[i], i%2);
-
- for (i = 0; i < 9; i++)
- {
- opll->key_status[i] = 0;
- setPatch (opll, i, 0);
- }
-
- for (i = 0; i < 0x40; i++)
- OPLL_writeReg (opll, i, 0);
-
-#ifndef EMU2413_COMPACTION
- opll->realstep = (e_uint32) ((1 << 31) / rate);
- opll->opllstep = (e_uint32) ((1 << 31) / (clk / 72));
- opll->oplltime = 0;
- for (i = 0; i < 14; i++)
- opll->pan[i] = 2;
- opll->sprev[0] = opll->sprev[1] = 0;
- opll->snext[0] = opll->snext[1] = 0;
-#endif
-}
-
-/* Force Refresh (When external program changes some parameters). */
-void
-OPLL_forceRefresh (OPLL * opll)
-{
- e_int32 i;
-
- if (opll == NULL)
- return;
-
- for (i = 0; i < 9; i++)
- setPatch(opll,i,opll->patch_number[i]);
-
- for (i = 0; i < 18; i++)
- {
- UPDATE_PG (&opll->slot[i]);
- UPDATE_RKS (&opll->slot[i]);
- UPDATE_TLL (&opll->slot[i]);
- UPDATE_WF (&opll->slot[i]);
- UPDATE_EG (&opll->slot[i]);
- }
-}
-
-void
-OPLL_set_rate (OPLL * opll, e_uint32 r)
-{
- if (rate == r) return;
- if (opll->quality)
- rate = 49716;
- else
- rate = r;
- internal_refresh ();
- rate = r;
-}
-
-void
-OPLL_set_quality (OPLL * opll, e_uint32 q)
-{
- opll->quality = q;
- OPLL_set_rate (opll, rate);
-}
-
-/*********************************************************
-
- Generate wave data
-
-*********************************************************/
-/* Convert Amp(0 to EG_HEIGHT) to Phase(0 to 2PI). */
-#if ( SLOT_AMP_BITS - PG_BITS ) > 0
-#define wave2_2pi(e) ( (e) >> ( SLOT_AMP_BITS - PG_BITS ))
-#else
-#define wave2_2pi(e) ( (e) << ( PG_BITS - SLOT_AMP_BITS ))
-#endif
-
-/* Convert Amp(0 to EG_HEIGHT) to Phase(0 to 4PI). */
-#if ( SLOT_AMP_BITS - PG_BITS - 1 ) == 0
-#define wave2_4pi(e) (e)
-#elif ( SLOT_AMP_BITS - PG_BITS - 1 ) > 0
-#define wave2_4pi(e) ( (e) >> ( SLOT_AMP_BITS - PG_BITS - 1 ))
-#else
-#define wave2_4pi(e) ( (e) << ( 1 + PG_BITS - SLOT_AMP_BITS ))
-#endif
-
-/* Convert Amp(0 to EG_HEIGHT) to Phase(0 to 8PI). */
-#if ( SLOT_AMP_BITS - PG_BITS - 2 ) == 0
-#define wave2_8pi(e) (e)
-#elif ( SLOT_AMP_BITS - PG_BITS - 2 ) > 0
-#define wave2_8pi(e) ( (e) >> ( SLOT_AMP_BITS - PG_BITS - 2 ))
-#else
-#define wave2_8pi(e) ( (e) << ( 2 + PG_BITS - SLOT_AMP_BITS ))
-#endif
-
-/* Update AM, PM unit */
-INLINE static void
-update_ampm (OPLL * opll)
-{
- opll->pm_phase = (opll->pm_phase + pm_dphase) & (PM_DP_WIDTH - 1);
- opll->am_phase = (opll->am_phase + am_dphase) & (AM_DP_WIDTH - 1);
- opll->lfo_am = AMTABLE(HIGHBITS (opll->am_phase, AM_DP_BITS - AM_PG_BITS));
- opll->lfo_pm = PMTABLE(HIGHBITS (opll->pm_phase, PM_DP_BITS - PM_PG_BITS));
-}
-
-/* PG */
-INLINE static void
-calc_phase (OPLL_SLOT * slot, e_int32 lfo)
-{
- if (slot->patch->PM)
- slot->phase += (slot->dphase * lfo) >> PM_AMP_BITS;
- else
- slot->phase += slot->dphase;
-
- slot->phase &= (DP_WIDTH - 1);
-
- slot->pgout = HIGHBITS (slot->phase, DP_BASE_BITS);
-}
-
-/* Update Noise unit */
-INLINE static void
-update_noise (OPLL * opll)
-{
- if(opll->noise_seed&1) opll->noise_seed ^= 0x8003020;
- opll->noise_seed >>= 1;
-}
-
-/* EG */
-INLINE static void
-calc_envelope (OPLL_SLOT * slot, e_int32 lfo)
-{
-#define S2E(x) (SL2EG((e_int32)(x/SL_STEP))<<(EG_DP_BITS-EG_BITS))
-
- static e_uint32 SL[16] = {
- S2E (0.0), S2E (3.0), S2E (6.0), S2E (9.0), S2E (12.0), S2E (15.0), S2E (18.0), S2E (21.0),
- S2E (24.0), S2E (27.0), S2E (30.0), S2E (33.0), S2E (36.0), S2E (39.0), S2E (42.0), S2E (48.0)
- };
-
- e_uint32 egout;
-
- switch (slot->eg_mode)
- {
- case ATTACK:
- egout = AR_ADJUST_TABLE(HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS));
- slot->eg_phase += slot->eg_dphase;
- if((EG_DP_WIDTH & slot->eg_phase)||(slot->patch->AR==15))
- {
- egout = 0;
- slot->eg_phase = 0;
- slot->eg_mode = DECAY;
- UPDATE_EG (slot);
- }
- break;
-
- case DECAY:
- egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS);
- slot->eg_phase += slot->eg_dphase;
- if (slot->eg_phase >= SL[slot->patch->SL])
- {
- if (slot->patch->EG)
- {
- slot->eg_phase = SL[slot->patch->SL];
- slot->eg_mode = SUSHOLD;
- UPDATE_EG (slot);
- }
- else
- {
- slot->eg_phase = SL[slot->patch->SL];
- slot->eg_mode = SUSTINE;
- UPDATE_EG (slot);
- }
- }
- break;
-
- case SUSHOLD:
- egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS);
- if (slot->patch->EG == 0)
- {
- slot->eg_mode = SUSTINE;
- UPDATE_EG (slot);
- }
- break;
-
- case SUSTINE:
- case RELEASE:
- egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS);
- slot->eg_phase += slot->eg_dphase;
- if (egout >= (1 << EG_BITS))
- {
- slot->eg_mode = FINISH;
- egout = (1 << EG_BITS) - 1;
- }
- break;
-
- case SETTLE:
- egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS);
- slot->eg_phase += slot->eg_dphase;
- if (egout >= (1 << EG_BITS))
- {
- slot->eg_mode = ATTACK;
- egout = (1 << EG_BITS) - 1;
- UPDATE_EG(slot);
- }
- break;
-
- case FINISH:
- egout = (1 << EG_BITS) - 1;
- break;
-
- default:
- egout = (1 << EG_BITS) - 1;
- break;
- }
-
- if (slot->patch->AM)
- egout = EG2DB (egout + slot->tll) + lfo;
- else
- egout = EG2DB (egout + slot->tll);
-
- if (egout >= DB_MUTE)
- egout = DB_MUTE - 1;
-
- slot->egout = egout | 3;
-}
-
-/* CARRIOR */
-INLINE static e_int32
-calc_slot_car (OPLL_SLOT * slot, e_int32 fm)
-{
- if (slot->egout >= (DB_MUTE - 1))
- {
- slot->output[0] = 0;
- }
- else
- {
- slot->output[0] = DB2LIN_TABLE[slot->sintbl[(slot->pgout+wave2_8pi(fm))&(PG_WIDTH-1)] + slot->egout];
- }
-
- slot->output[1] = (slot->output[1] + slot->output[0]) >> 1;
- return slot->output[1];
-}
-
-/* MODULATOR */
-INLINE static e_int32
-calc_slot_mod (OPLL_SLOT * slot)
-{
- e_int32 fm;
-
- slot->output[1] = slot->output[0];
-
- if (slot->egout >= (DB_MUTE - 1))
- {
- slot->output[0] = 0;
- }
- else if (slot->patch->FB != 0)
- {
- fm = wave2_4pi (slot->feedback) >> (7 - slot->patch->FB);
- slot->output[0] = DB2LIN_TABLE[slot->sintbl[(slot->pgout+fm)&(PG_WIDTH-1)] + slot->egout];
- }
- else
- {
- slot->output[0] = DB2LIN_TABLE[slot->sintbl[slot->pgout] + slot->egout];
- }
-
- slot->feedback = (slot->output[1] + slot->output[0]) >> 1;
-
- return slot->feedback;
-
-}
-
-/* TOM */
-INLINE static e_int32
-calc_slot_tom (OPLL_SLOT * slot)
-{
- if (slot->egout >= (DB_MUTE - 1))
- return 0;
-
- return DB2LIN_TABLE[slot->sintbl[slot->pgout] + slot->egout];
-
-}
-
-/* SNARE */
-INLINE static e_int32
-calc_slot_snare (OPLL_SLOT * slot, e_uint32 noise)
-{
- if(slot->egout>=(DB_MUTE-1))
- return 0;
-
- if(BIT(slot->pgout,7))
- return DB2LIN_TABLE[(noise?DB_POS(0):DB_POS(15))+slot->egout];
- else
- return DB2LIN_TABLE[(noise?DB_NEG(0):DB_NEG(15))+slot->egout];
-}
-
-/*
- TOP-CYM
- */
-INLINE static e_int32
-calc_slot_cym (OPLL_SLOT * slot, e_uint32 pgout_hh)
-{
- e_uint32 dbout;
-
- if (slot->egout >= (DB_MUTE - 1))
- return 0;
- else if(
- /* the same as fmopl.c */
- ((BIT(pgout_hh,PG_BITS-8)^BIT(pgout_hh,PG_BITS-1))|BIT(pgout_hh,PG_BITS-7)) ^
- /* different from fmopl.c */
- (BIT(slot->pgout,PG_BITS-7)&!BIT(slot->pgout,PG_BITS-5))
- )
- dbout = DB_NEG(3);
- else
- dbout = DB_POS(3);
-
- return DB2LIN_TABLE[dbout + slot->egout];
-}
-
-/*
- HI-HAT
-*/
-INLINE static e_int32
-calc_slot_hat (OPLL_SLOT *slot, e_int32 pgout_cym, e_uint32 noise)
-{
- e_uint32 dbout;
-
- if (slot->egout >= (DB_MUTE - 1))
- return 0;
- else if(
- /* the same as fmopl.c */
- ((BIT(slot->pgout,PG_BITS-8)^BIT(slot->pgout,PG_BITS-1))|BIT(slot->pgout,PG_BITS-7)) ^
- /* different from fmopl.c */
- (BIT(pgout_cym,PG_BITS-7)&!BIT(pgout_cym,PG_BITS-5))
- )
- {
- if(noise)
- dbout = DB_NEG(12);
- else
- dbout = DB_NEG(24);
- }
- else
- {
- if(noise)
- dbout = DB_POS(12);
- else
- dbout = DB_POS(24);
- }
-
- return DB2LIN_TABLE[dbout + slot->egout];
-}
-
-static e_int16
-calc (OPLL * opll) EMU2413_CALC_ICODE;
-static e_int16
-calc (OPLL * opll)
-{
- e_int32 i;
-
- update_ampm (opll);
- update_noise (opll);
-
- for (i = 0; i < 18; i++)
- {
- calc_phase(&opll->slot[i],opll->lfo_pm);
- calc_envelope(&opll->slot[i],opll->lfo_am);
- }
-
- e_uint32 channel_mask = opll->mask;
- for (i = 0; i < 9; i++) {
- if (CAR(opll,i)->eg_mode != FINISH)
- channel_mask |= (1 << i);
- }
-
- e_int32 mix = 0;
-
- /* CH6 */
- if (opll->patch_number[6] & 0x10) {
- if (channel_mask & OPLL_MASK_CH (6)) {
- mix += calc_slot_car (CAR(opll,6), calc_slot_mod(MOD(opll,6)));
- channel_mask &= ~(1 << 6);
- }
- }
-
- /* CH7 */
- if (opll->patch_number[7] & 0x10) {
- if (MOD(opll,7)->eg_mode != FINISH)
- mix += calc_slot_hat (MOD(opll,7), CAR(opll,8)->pgout, opll->noise_seed&1);
- if (channel_mask & OPLL_MASK_SD) {
- mix -= calc_slot_snare (CAR(opll,7), opll->noise_seed&1);
- channel_mask &= ~OPLL_MASK_SD;
- }
- }
-
- /* CH8 */
- if (opll->patch_number[8] & 0x10) {
- if (MOD(opll,8)->eg_mode != FINISH)
- mix += calc_slot_tom (MOD(opll,8));
- if (channel_mask & OPLL_MASK_CYM) {
- mix -= calc_slot_cym (CAR(opll,8), MOD(opll,7)->pgout);
- channel_mask &= ~OPLL_MASK_CYM;
- }
- }
-
- mix <<= 1;
-
- opll->current_mask = channel_mask;
- for (i = 0; channel_mask; channel_mask >>= 1, ++i) {
- if (channel_mask & 1) {
- mix += calc_slot_car (CAR(opll,i), calc_slot_mod(MOD(opll,i)));
- }
- }
-
- return (e_int16) mix << 3;
-}
-
-void
-OPLL_set_internal_mute(OPLL * opll, e_uint32 mute)
-{
- opll->internal_mute = mute;
-}
-
-e_uint32
-OPLL_is_internal_muted(OPLL * opll)
-{
- return opll->internal_mute;
-}
-
-static e_uint32
-check_mute_helper(OPLL * opll)
-{
- for (int i = 0; i < 6; i++) {
- /* if (ch[i].car.eg_mode != FINISH) return 0; */
- if (!(opll->current_mask & OPLL_MASK_CH (i)) && (CAR(opll,i)->eg_mode != FINISH)) return 0;
- }
-
- if (!(opll->reg[0x0e] & 0x20)) {
- for(int i = 6; i < 9; i++) {
- /* if (ch[i].car.eg_mode != FINISH) return 0; */
- if (!(opll->current_mask & OPLL_MASK_CH (i)) && (CAR(opll,i)->eg_mode != FINISH)) return 0;
- }
- } else {
- /* if (ch[6].car.eg_mode != FINISH) return false;
- if (ch[7].mod.eg_mode != FINISH) return false;
- if (ch[7].car.eg_mode != FINISH) return false;
- if (ch[8].mod.eg_mode != FINISH) return false;
- if (ch[8].car.eg_mode != FINISH) return false; */
- if (!(opll->current_mask & OPLL_MASK_CH (6)) && (CAR(opll,6)->eg_mode != FINISH)) return 0;
- if (!(opll->current_mask & OPLL_MASK_CH (7)) && (MOD(opll,7)->eg_mode != FINISH)) return 0;
- if (!(opll->current_mask & OPLL_MASK_CH (7)) && (CAR(opll,7)->eg_mode != FINISH)) return 0;
- if (!(opll->current_mask & OPLL_MASK_CH (8)) && (MOD(opll,8)->eg_mode != FINISH)) return 0;
- if (!(opll->current_mask & OPLL_MASK_CH (8)) && (CAR(opll,8)->eg_mode != FINISH)) return 0;
- }
-
- return 1; /* nothing is playing, then mute */
-}
-
-static void
-check_mute(OPLL * opll)
-{
- OPLL_set_internal_mute (opll, check_mute_helper (opll));
-}
-
-EMU2413_API e_int16 *OPLL_update_buffer(OPLL * opll, e_uint32 length)
-{
- e_int16* buf = opll->buffer;
- while (length--) {
- *(buf++) = calc (opll);
- }
- check_mute (opll);
-
- return opll->buffer;
-}
-
-#ifdef EMU2413_COMPACTION
-e_int16
-OPLL_calc (OPLL * opll)
-{
- return calc (opll);
-}
-#else
-e_int16
-OPLL_calc (OPLL * opll)
-{
- if (!opll->quality)
- return calc (opll);
-
- while (opll->realstep > opll->oplltime)
- {
- opll->oplltime += opll->opllstep;
- opll->prev = opll->next;
- opll->next = calc (opll);
- }
-
- opll->oplltime -= opll->realstep;
- opll->out = (e_int16) (((double) opll->next * (opll->opllstep - opll->oplltime)
- + (double) opll->prev * opll->oplltime) / opll->opllstep);
-
- return (e_int16) opll->out;
-}
-#endif
-
-e_uint32
-OPLL_setMask (OPLL * opll, e_uint32 mask)
-{
- e_uint32 ret;
-
- if (opll)
- {
- ret = opll->mask;
- opll->mask = mask;
- return ret;
- }
- else
- return 0;
-}
-
-e_uint32
-OPLL_toggleMask (OPLL * opll, e_uint32 mask)
-{
- e_uint32 ret;
-
- if (opll)
- {
- ret = opll->mask;
- opll->mask ^= mask;
- return ret;
- }
- else
- return 0;
-}
-
-/****************************************************
-
- I/O Ctrl
-
-*****************************************************/
-
-void
-OPLL_writeReg (OPLL * opll, e_uint32 reg, e_uint32 data)
-{
- e_int32 i, v, ch;
-
- data = data & 0xff;
- reg = reg & 0x3f;
- opll->reg[reg] = (e_uint8) data;
-
- switch (reg)
- {
- case 0x00:
- opll->patch[0].AM = (data >> 7) & 1;
- opll->patch[0].PM = (data >> 6) & 1;
- opll->patch[0].EG = (data >> 5) & 1;
- opll->patch[0].KR = (data >> 4) & 1;
- opll->patch[0].ML = (data) & 15;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_PG (MOD(opll,i));
- UPDATE_RKS (MOD(opll,i));
- UPDATE_EG (MOD(opll,i));
- }
- }
- break;
-
- case 0x01:
- opll->patch[1].AM = (data >> 7) & 1;
- opll->patch[1].PM = (data >> 6) & 1;
- opll->patch[1].EG = (data >> 5) & 1;
- opll->patch[1].KR = (data >> 4) & 1;
- opll->patch[1].ML = (data) & 15;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_PG (CAR(opll,i));
- UPDATE_RKS (CAR(opll,i));
- UPDATE_EG (CAR(opll,i));
- }
- }
- break;
-
- case 0x02:
- opll->patch[0].KL = (data >> 6) & 3;
- opll->patch[0].TL = (data) & 63;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_TLL(MOD(opll,i));
- }
- }
- break;
-
- case 0x03:
- opll->patch[1].KL = (data >> 6) & 3;
- opll->patch[1].WF = (data >> 4) & 1;
- opll->patch[0].WF = (data >> 3) & 1;
- opll->patch[0].FB = (data) & 7;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_WF(MOD(opll,i));
- UPDATE_WF(CAR(opll,i));
- }
- }
- break;
-
- case 0x04:
- opll->patch[0].AR = (data >> 4) & 15;
- opll->patch[0].DR = (data) & 15;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_EG (MOD(opll,i));
- }
- }
- break;
-
- case 0x05:
- opll->patch[1].AR = (data >> 4) & 15;
- opll->patch[1].DR = (data) & 15;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_EG(CAR(opll,i));
- }
- }
- break;
-
- case 0x06:
- opll->patch[0].SL = (data >> 4) & 15;
- opll->patch[0].RR = (data) & 15;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_EG (MOD(opll,i));
- }
- }
- break;
-
- case 0x07:
- opll->patch[1].SL = (data >> 4) & 15;
- opll->patch[1].RR = (data) & 15;
- for (i = 0; i < 9; i++)
- {
- if (opll->patch_number[i] == 0)
- {
- UPDATE_EG (CAR(opll,i));
- }
- }
- break;
-
- case 0x0e:
- update_rhythm_mode (opll);
- if (data & 32)
- {
- if (data & 0x10)
- keyOn_BD (opll);
- else
- keyOff_BD (opll);
- if (data & 0x8)
- keyOn_SD (opll);
- else
- keyOff_SD (opll);
- if (data & 0x4)
- keyOn_TOM (opll);
- else
- keyOff_TOM (opll);
- if (data & 0x2)
- keyOn_CYM (opll);
- else
- keyOff_CYM (opll);
- if (data & 0x1)
- keyOn_HH (opll);
- else
- keyOff_HH (opll);
- }
- update_key_status (opll);
-
- UPDATE_ALL (MOD(opll,6));
- UPDATE_ALL (CAR(opll,6));
- UPDATE_ALL (MOD(opll,7));
- UPDATE_ALL (CAR(opll,7));
- UPDATE_ALL (MOD(opll,8));
- UPDATE_ALL (CAR(opll,8));
-
- break;
-
- case 0x0f:
- break;
-
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
- case 0x18:
- ch = reg - 0x10;
- setFnumber (opll, ch, data + ((opll->reg[0x20 + ch] & 1) << 8));
- UPDATE_ALL (MOD(opll,ch));
- UPDATE_ALL (CAR(opll,ch));
- break;
-
- case 0x20:
- case 0x21:
- case 0x22:
- case 0x23:
- case 0x24:
- case 0x25:
- case 0x26:
- case 0x27:
- case 0x28:
- ch = reg - 0x20;
- setFnumber (opll, ch, ((data & 1) << 8) + opll->reg[0x10 + ch]);
- setBlock (opll, ch, (data >> 1) & 7);
- setSustine (opll, ch, (data >> 5) & 1);
- if (data & 0x10)
- keyOn (opll, ch);
- else
- keyOff (opll, ch);
- UPDATE_ALL (MOD(opll,ch));
- UPDATE_ALL (CAR(opll,ch));
- update_key_status (opll);
- update_rhythm_mode (opll);
- break;
-
- case 0x30:
- case 0x31:
- case 0x32:
- case 0x33:
- case 0x34:
- case 0x35:
- case 0x36:
- case 0x37:
- case 0x38:
- i = (data >> 4) & 15;
- v = data & 15;
- if ((opll->reg[0x0e] & 32) && (reg >= 0x36))
- {
- switch (reg)
- {
- case 0x37:
- setSlotVolume (MOD(opll,7), i << 2);
- break;
- case 0x38:
- setSlotVolume (MOD(opll,8), i << 2);
- break;
- default:
- break;
- }
- }
- else
- {
- setPatch (opll, reg - 0x30, i);
- }
- setVolume (opll, reg - 0x30, v << 2);
- UPDATE_ALL (MOD(opll,reg - 0x30));
- UPDATE_ALL (CAR(opll,reg - 0x30));
- break;
-
- default:
- break;
-
- }
-}
-
-void
-OPLL_writeIO (OPLL * opll, e_uint32 adr, e_uint32 val)
-{
- if (adr & 1)
- OPLL_writeReg (opll, opll->adr, val);
- else
- opll->adr = val;
-}
-
-e_uint32
-OPLL_read(OPLL * opll, e_uint32 a)
-{
- if( !(a&1) )
- {
- /* status port */
- return opll->status;
- }
- return 0xff;
-}
-
-#ifndef EMU2413_COMPACTION
-/* STEREO MODE (OPT) */
-void
-OPLL_set_pan (OPLL * opll, e_uint32 ch, e_uint32 pan)
-{
- opll->pan[ch & 15] = pan & 3;
-}
-
-static void
-calc_stereo (OPLL * opll, e_int32 out[2])
-{
- e_int32 b[4] = { 0, 0, 0, 0 }; /* Ignore, Right, Left, Center */
- e_int32 r[4] = { 0, 0, 0, 0 }; /* Ignore, Right, Left, Center */
- e_int32 i;
-
- update_ampm (opll);
- update_noise (opll);
-
- for(i=0;i<18;i++)
- {
- calc_phase(&opll->slot[i],opll->lfo_pm);
- calc_envelope(&opll->slot[i],opll->lfo_am);
- }
-
- for (i = 0; i < 6; i++)
- if (!(opll->mask & OPLL_MASK_CH (i)) && (CAR(opll,i)->eg_mode != FINISH))
- b[opll->pan[i]] += calc_slot_car (CAR(opll,i), calc_slot_mod (MOD(opll,i)));
-
-
- if (opll->patch_number[6] <= 15)
- {
- if (!(opll->mask & OPLL_MASK_CH (6)) && (CAR(opll,6)->eg_mode != FINISH))
- b[opll->pan[6]] += calc_slot_car (CAR(opll,6), calc_slot_mod (MOD(opll,6)));
- }
- else
- {
- if (!(opll->mask & OPLL_MASK_BD) && (CAR(opll,6)->eg_mode != FINISH))
- r[opll->pan[9]] += calc_slot_car (CAR(opll,6), calc_slot_mod (MOD(opll,6)));
- }
-
- if (opll->patch_number[7] <= 15)
- {
- if (!(opll->mask & OPLL_MASK_CH (7)) && (CAR (opll,7)->eg_mode != FINISH))
- b[opll->pan[7]] += calc_slot_car (CAR (opll,7), calc_slot_mod (MOD (opll,7)));
- }
- else
- {
- if (!(opll->mask & OPLL_MASK_HH) && (MOD (opll,7)->eg_mode != FINISH))
- r[opll->pan[10]] += calc_slot_hat (MOD (opll,7), CAR(opll,8)->pgout, opll->noise_seed&1);
- if (!(opll->mask & OPLL_MASK_SD) && (CAR (opll,7)->eg_mode != FINISH))
- r[opll->pan[11]] -= calc_slot_snare (CAR (opll,7), opll->noise_seed&1);
- }
-
- if (opll->patch_number[8] <= 15)
- {
- if (!(opll->mask & OPLL_MASK_CH (8)) && (CAR (opll,8)->eg_mode != FINISH))
- b[opll->pan[8]] += calc_slot_car (CAR (opll,8), calc_slot_mod (MOD (opll,8)));
- }
- else
- {
- if (!(opll->mask & OPLL_MASK_TOM) && (MOD (opll,8)->eg_mode != FINISH))
- r[opll->pan[12]] += calc_slot_tom (MOD (opll,8));
- if (!(opll->mask & OPLL_MASK_CYM) && (CAR (opll,8)->eg_mode != FINISH))
- r[opll->pan[13]] -= calc_slot_cym (CAR (opll,8), MOD(opll,7)->pgout);
- }
-
- out[1] = (b[1] + b[3] + ((r[1] + r[3]) << 1)) <<3;
- out[0] = (b[2] + b[3] + ((r[2] + r[3]) << 1)) <<3;
-}
-
-void
-OPLL_calc_stereo (OPLL * opll, e_int32 out[2])
-{
- if (!opll->quality)
- {
- calc_stereo (opll, out);
- return;
- }
-
- while (opll->realstep > opll->oplltime)
- {
- opll->oplltime += opll->opllstep;
- opll->sprev[0] = opll->snext[0];
- opll->sprev[1] = opll->snext[1];
- calc_stereo (opll, opll->snext);
- }
-
- opll->oplltime -= opll->realstep;
- out[0] = (e_int16) (((double) opll->snext[0] * (opll->opllstep - opll->oplltime)
- + (double) opll->sprev[0] * opll->oplltime) / opll->opllstep);
- out[1] = (e_int16) (((double) opll->snext[1] * (opll->opllstep - opll->oplltime)
- + (double) opll->sprev[1] * opll->oplltime) / opll->opllstep);
-}
-#endif /* EMU2413_COMPACTION */
+/*********************************************************************************** + + emu2413.c -- YM2413 emulator written by Mitsutaka Okazaki 2001 + + 2001 01-08 : Version 0.10 -- 1st version. + 2001 01-15 : Version 0.20 -- semi-public version. + 2001 01-16 : Version 0.30 -- 1st public version. + 2001 01-17 : Version 0.31 -- Fixed bassdrum problem. + : Version 0.32 -- LPF implemented. + 2001 01-18 : Version 0.33 -- Fixed the drum problem, refine the mix-down method. + -- Fixed the LFO bug. + 2001 01-24 : Version 0.35 -- Fixed the drum problem, + support undocumented EG behavior. + 2001 02-02 : Version 0.38 -- Improved the performance. + Fixed the hi-hat and cymbal model. + Fixed the default percussive datas. + Noise reduction. + Fixed the feedback problem. + 2001 03-03 : Version 0.39 -- Fixed some drum bugs. + Improved the performance. + 2001 03-04 : Version 0.40 -- Improved the feedback. + Change the default table size. + Clock and Rate can be changed during play. + 2001 06-24 : Version 0.50 -- Improved the hi-hat and the cymbal tone. + Added VRC7 patch (OPLL_reset_patch is changed). + Fixed OPLL_reset() bug. + Added OPLL_setMask, OPLL_getMask and OPLL_toggleMask. + Added OPLL_writeIO. + 2001 09-28 : Version 0.51 -- Removed the noise table. + 2002 01-28 : Version 0.52 -- Added Stereo mode. + 2002 02-07 : Version 0.53 -- Fixed some drum bugs. + 2002 02-20 : Version 0.54 -- Added the best quality mode. + 2002 03-02 : Version 0.55 -- Removed OPLL_init & OPLL_close. + 2002 05-30 : Version 0.60 -- Fixed HH&CYM generator and all voice datas. + 2004 04-10 : Version 0.61 -- Added YMF281B tone (defined by Chabin). + + 2011 03-22 : --------------- Modified by gama to use precalculated tables. + + References: + fmopl.c -- 1999,2000 written by Tatsuyuki Satoh (MAME development). + fmopl.c(fixed) -- (C) 2002 Jarek Burczynski. + s_opl.c -- 2001 written by Mamiya (NEZplug development). + fmgen.cpp -- 1999,2000 written by cisc. + fmpac.ill -- 2000 created by NARUTO. + MSX-Datapack + YMU757 data sheet + YM2143 data sheet + +**************************************************************************************/ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include "emu2413.h" + +#include "emutables.h" +#if !defined(ROCKBOX) + #define EMU2413_CALCUL_TABLES +#else + #define EMU2413_COMPACTION + #include "emutables.h" +#endif + +#if defined(EMU2413_COMPACTION) && !defined(ROCKBOX) +#define OPLL_TONE_NUM 1 +static unsigned char default_inst[OPLL_TONE_NUM][(16 + 3) * 16] = { + { +#include "2413tone.h" + } +}; +#else +#define OPLL_TONE_NUM 3 +static unsigned char default_inst[OPLL_TONE_NUM][(16 + 3) * 16] = { + { +#include "2413tone.h" + }, + { +#include "vrc7tone.h" + }, + { +#include "281btone.h" + } +}; +#endif + +/* Size of Sintable ( 8 -- 18 can be used. 9 recommended.) */ +#define PG_BITS 9 +#define PG_WIDTH (1<<PG_BITS) + +/* Phase increment counter */ +#define DP_BITS 18 +#define DP_WIDTH (1<<DP_BITS) +#define DP_BASE_BITS (DP_BITS - PG_BITS) + +/* Dynamic range (Accuracy of sin table) */ +#define DB_PREC 48 +#define DB_BITS 8 +#define DB_STEP ((double)DB_PREC/(1<<DB_BITS)) +#define DB_MUTE (1<<DB_BITS) + +/* Dynamic range of envelope */ +#define EG_STEP 0.375 +#define EG_BITS 7 +#define EG_MUTE (1<<EG_BITS) + +/* Dynamic range of total level */ +#define TL_STEP 0.75 +#define TL_BITS 6 +#define TL_MUTE (1<<TL_BITS) + +/* Dynamic range of sustine level */ +#define SL_STEP 3.0 +#define SL_BITS 4 +#define SL_MUTE (1<<SL_BITS) + +#define EG2DB(d) ((d)*(e_int32)(EG_STEP/DB_STEP)) +#define TL2EG(d) ((d)*(e_int32)(TL_STEP/EG_STEP)) +#define SL2EG(d) ((d)*(e_int32)(SL_STEP/EG_STEP)) + +#define DB_POS(x) (x*DB_MUTE/DB_PREC) +#define DB_NEG(x) (DB_MUTE+DB_MUTE+x*DB_MUTE/DB_PREC) + +/* Bits for liner value */ +#define DB2LIN_AMP_BITS 8 +#define SLOT_AMP_BITS (DB2LIN_AMP_BITS) + +/* Bits for envelope phase incremental counter */ +#define EG_DP_BITS 22 +#define EG_DP_WIDTH (1<<EG_DP_BITS) + +/* Bits for Pitch and Amp modulator */ +#define PM_PG_BITS 8 +#define PM_PG_WIDTH (1<<PM_PG_BITS) +#define PM_DP_BITS 16 +#define PM_DP_WIDTH (1<<PM_DP_BITS) +#define AM_PG_BITS 8 +#define AM_PG_WIDTH (1<<AM_PG_BITS) +#define AM_DP_BITS 16 +#define AM_DP_WIDTH (1<<AM_DP_BITS) + +/* PM table is calcurated by PM_AMP * pow(2,PM_DEPTH*sin(x)/1200) */ +#define PM_AMP_BITS 8 +#define PM_AMP (1<<PM_AMP_BITS) + +/* PM speed(Hz) and depth(cent) */ +#define PM_SPEED 6.4 +#define PM_DEPTH 13.75 + +/* AM speed(Hz) and depth(dB) */ +#define AM_SPEED 3.6413 +#define AM_DEPTH 4.875 + +/* Cut the lower b bit(s) off. */ +#define HIGHBITS(c,b) ((c)>>(b)) + +/* Leave the lower b bit(s). */ +#define LOWBITS(c,b) ((c)&((1<<(b))-1)) + +/* Expand x which is s bits to d bits. */ +#define EXPAND_BITS(x,s,d) ((x)<<((d)-(s))) + +/* Expand x which is s bits to d bits and fill expanded bits '1' */ +#define EXPAND_BITS_X(x,s,d) (((x)<<((d)-(s)))|((1<<((d)-(s)))-1)) + +/* Adjust envelope speed which depends on sampling rate. */ +#define RATE_ADJUST(x) (rate==49716?(e_uint32)x:(e_uint32)(((long long)(x)*clk/rate+36)/72)) + +#define MOD(o,x) (&(o)->slot[(x)<<1]) +#define CAR(o,x) (&(o)->slot[((x)<<1)|1]) + +#define BIT(s,b) (((s)>>(b))&1) + +/* Input clock */ +static e_uint32 clk = 844451141; +/* Sampling rate */ +static e_uint32 rate = 3354932; + +/* WaveTable for each envelope amp */ +static e_uint16 fullsintable[PG_WIDTH]; +static e_uint16 halfsintable[PG_WIDTH]; + +static e_uint16 *waveform[2] = { fullsintable, halfsintable }; + +/* LFO Table */ +#ifdef EMU2413_CALCUL_TABLES + static e_int32 pmtable[PM_PG_WIDTH]; + static e_int32 amtable[AM_PG_WIDTH]; + #define PMTABLE(x) pmtable[x] + #define AMTABLE(x) amtable[x] +#else + #define PMTABLE(x) (e_int32)pm_coeff[x] + #if (PM_PG_WIDTH != 256) + #error PM_PG_WIDTH must be set to 256 if EMU2413_CALCUL_TABLES is not defined + #endif + #define AMTABLE(x) (e_int32)am_coeff[x] + #if (AM_PG_WIDTH != 256) + #error AM_PG_WIDTH must be set to 256 if EMU2413_CALCUL_TABLES is not defined + #endif +#endif + +/* Phase delta for LFO */ +static e_uint32 pm_dphase; +static e_uint32 am_dphase; + +/* dB to Liner table */ +static e_int16 DB2LIN_TABLE[(DB_MUTE + DB_MUTE) * 2]; + +/* Liner to Log curve conversion table (for Attack rate). */ +#ifdef EMU2413_CALCUL_TABLES + static e_uint16 ar_adjust_table[1 << EG_BITS]; + #define AR_ADJUST_TABLE(x) ar_adjust_table[x] +#else + #define AR_ADJUST_TABLE(x) ar_adjust_coeff[x] + #if (EG_BITS != 7) + #error EG_BITS must be set to 7 if EMU2413_CALCUL_TABLES is not defined + #endif +#endif + +/* Empty voice data */ +static OPLL_PATCH null_patch = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +/* Basic voice Data */ +static OPLL_PATCH default_patch[OPLL_TONE_NUM][(16 + 3) * 2]; + +/* Definition of envelope mode */ +enum OPLL_EG_STATE +{ READY, ATTACK, DECAY, SUSHOLD, SUSTINE, RELEASE, SETTLE, FINISH }; + +/* Phase incr table for Attack */ +static e_uint32 dphaseARTable[16][16]; +/* Phase incr table for Decay and Release */ +static e_uint32 dphaseDRTable[16][16]; + +/* KSL + TL Table */ +e_uint8 tllTable[16][8][1 << TL_BITS][4]; +static e_int32 rksTable[2][8][2]; + +/* We may not have too much SRAM in rockbox */ +#if !defined(ROCKBOX) +/* Phase incr table for PG */ +static e_uint32 dphaseTable[512][8][16]; +#endif + +/*************************************************** + + Create tables + +****************************************************/ +#ifdef EMU2413_CALCUL_TABLES +INLINE static e_int32 +Min (e_int32 i, e_int32 j) +{ + if (i < j) + return i; + else + return j; +} + +/* Table for AR to LogCurve. */ +static void +makeAdjustTable (void) +{ + e_int32 i; + + ar_adjust_table[0] = (1 << EG_BITS) - 1; + for (i = 1; i < (1<<EG_BITS); i++) + ar_adjust_table[i] = (e_uint16) ((double) (1<<EG_BITS)-1 - ((1<<EG_BITS)-1)*log(i)/log(127)); +} +#endif + +/* Table for dB(0 -- (1<<DB_BITS)-1) to Liner(0 -- DB2LIN_AMP_WIDTH) */ +static void +makeDB2LinTable (void) +{ + e_int32 i; + for (i = 0; i < DB_MUTE + DB_MUTE; i++) + { + #ifdef EMU2413_CALCUL_TABLES + DB2LIN_TABLE[i] = (e_int16) ((double) ((1 << DB2LIN_AMP_BITS) - 1) * pow (10, -(double) i * DB_STEP / 20)); + #else + DB2LIN_TABLE[i] = db2lin_coeff[i]; + #endif + if (i >= DB_MUTE) DB2LIN_TABLE[i] = 0; + DB2LIN_TABLE[i + DB_MUTE + DB_MUTE] = (e_int16) (-DB2LIN_TABLE[i]); + } +} + +#ifdef EMU2413_CALCUL_TABLES +/* Liner(+0.0 - +1.0) to dB((1<<DB_BITS) - 1 -- 0) */ +static e_int32 +lin2db (double d) +{ + if (d == 0) + return (DB_MUTE - 1); + else + return Min (-(e_int32) (20.0 * log10 (d) / DB_STEP), DB_MUTE-1); /* 0 -- 127 */ +} +#endif + +/* Sin Table */ +static void +makeSinTable (void) +{ + e_int32 i; + + for (i = 0; i < PG_WIDTH / 4; i++) + #ifdef EMU2413_CALCUL_TABLES + fullsintable[i] = (e_uint32) lin2db (sin (2.0 * PI * i / PG_WIDTH) ); + #else + fullsintable[i] = sin_coeff[i]; + #endif + + for (i = 0; i < PG_WIDTH / 4; i++) + { + fullsintable[PG_WIDTH / 2 - 1 - i] = fullsintable[i]; + } + + for (i = 0; i < PG_WIDTH / 2; i++) + { + fullsintable[PG_WIDTH / 2 + i] = (e_uint32) (DB_MUTE + DB_MUTE + fullsintable[i]); + } + + for (i = 0; i < PG_WIDTH / 2; i++) + halfsintable[i] = fullsintable[i]; + for (i = PG_WIDTH / 2; i < PG_WIDTH; i++) + halfsintable[i] = fullsintable[0]; +} + +#ifdef EMU2413_CALCUL_TABLES +static double saw(double phase) +{ + if(phase <= PI/2) + return phase * 2 / PI ; + else if(phase <= PI*3/2) + return 2.0 - ( phase * 2 / PI ); + else + return -4.0 + phase * 2 / PI; +} + +/* Table for Pitch Modulator */ +static void +makePmTable (void) +{ + e_int32 i; + + for (i = 0; i < PM_PG_WIDTH; i++) + /* pmtable[i] = (e_int32) ((double) PM_AMP * pow (2, (double) PM_DEPTH * sin (2.0 * PI * i / PM_PG_WIDTH) / 1200)); */ + pmtable[i] = (e_int32) ((double) PM_AMP * pow (2, (double) PM_DEPTH * saw (2.0 * PI * i / PM_PG_WIDTH) / 1200)); +} + +/* Table for Amp Modulator */ +static void +makeAmTable (void) +{ + e_int32 i; + + for (i = 0; i < AM_PG_WIDTH; i++) + /* amtable[i] = (e_int32) ((double) AM_DEPTH / 2 / DB_STEP * (1.0 + sin (2.0 * PI * i / PM_PG_WIDTH))); */ + amtable[i] = (e_int32) ((double) AM_DEPTH / 2 / DB_STEP * (1.0 + saw (2.0 * PI * i / PM_PG_WIDTH))); +} +#endif + +#if !defined(ROCKBOX) +/* Phase increment counter table */ +static void +makeDphaseTable (void) +{ + e_uint32 fnum, block, ML; + e_uint32 mltable[16] = + { 1, 1 * 2, 2 * 2, 3 * 2, 4 * 2, 5 * 2, 6 * 2, 7 * 2, 8 * 2, 9 * 2, 10 * 2, 10 * 2, 12 * 2, 12 * 2, 15 * 2, 15 * 2 }; + + for (fnum = 0; fnum < 512; fnum++) + for (block = 0; block < 8; block++) + for (ML = 0; ML < 16; ML++) + dphaseTable[fnum][block][ML] = RATE_ADJUST (((fnum * mltable[ML]) << block) >> (20 - DP_BITS)); +} +#endif + +static void +makeTllTable (void) +{ +/* Multiplication owith 8 to have an integer result. This allows to remove floating point operation. */ +#define dB2(x) (int)((x)*2*8) + + static int kltable[16] = { + dB2 ( 0.000), dB2 ( 9.000), dB2 (12.000), dB2 (13.875), dB2 (15.000), dB2 (16.125), dB2 (16.875), dB2 (17.625), + dB2 (18.000), dB2 (18.750), dB2 (19.125), dB2 (19.500), dB2 (19.875), dB2 (20.250), dB2 (20.625), dB2 (21.000) + }; + + e_int32 tmp; + e_int32 fnum, block, TL, KL; + + for (fnum = 0; fnum < 16; fnum++) + for (block = 0; block < 8; block++) + for (TL = 0; TL < 64; TL++) + for (KL = 0; KL < 4; KL++) + { + if (KL == 0) + { + tllTable[fnum][block][TL][KL] = TL2EG (TL); + } + else + { + tmp = (e_int32) ((kltable[fnum] - dB2 (3.000) * (7 - block))/8); + if (tmp <= 0) + tllTable[fnum][block][TL][KL] = TL2EG (TL); + else + /* tllTable[fnum][block][TL][KL] = (e_uint32) ((tmp >> (3 - KL)) / EG_STEP) + TL2EG (TL); */ + tllTable[fnum][block][TL][KL] = (e_uint32) ((tmp << KL) / (int)(EG_STEP*8)) + TL2EG (TL); + } + } +} + +#ifdef USE_SPEC_ENV_SPEED +static double attacktime[16][4] = { + {0, 0, 0, 0}, + {1730.15, 1400.60, 1153.43, 988.66}, + {865.08, 700.30, 576.72, 494.33}, + {432.54, 350.15, 288.36, 247.16}, + {216.27, 175.07, 144.18, 123.58}, + {108.13, 87.54, 72.09, 61.79}, + {54.07, 43.77, 36.04, 30.90}, + {27.03, 21.88, 18.02, 15.45}, + {13.52, 10.94, 9.01, 7.72}, + {6.76, 5.47, 4.51, 3.86}, + {3.38, 2.74, 2.25, 1.93}, + {1.69, 1.37, 1.13, 0.97}, + {0.84, 0.70, 0.60, 0.54}, + {0.50, 0.42, 0.34, 0.30}, + {0.28, 0.22, 0.18, 0.14}, + {0.00, 0.00, 0.00, 0.00} +}; + +static double decaytime[16][4] = { + {0, 0, 0, 0}, + {20926.60, 16807.20, 14006.00, 12028.60}, + {10463.30, 8403.58, 7002.98, 6014.32}, + {5231.64, 4201.79, 3501.49, 3007.16}, + {2615.82, 2100.89, 1750.75, 1503.58}, + {1307.91, 1050.45, 875.37, 751.79}, + {653.95, 525.22, 437.69, 375.90}, + {326.98, 262.61, 218.84, 187.95}, + {163.49, 131.31, 109.42, 93.97}, + {81.74, 65.65, 54.71, 46.99}, + {40.87, 32.83, 27.36, 23.49}, + {20.44, 16.41, 13.68, 11.75}, + {10.22, 8.21, 6.84, 5.87}, + {5.11, 4.10, 3.42, 2.94}, + {2.55, 2.05, 1.71, 1.47}, + {1.27, 1.27, 1.27, 1.27} +}; +#endif + +/* Rate Table for Attack */ +static void +makeDphaseARTable (void) +{ + e_int32 AR, Rks, RM, RL; + +#ifdef USE_SPEC_ENV_SPEED + e_uint32 attacktable[16][4]; + + for (RM = 0; RM < 16; RM++) + for (RL = 0; RL < 4; RL++) + { + if (RM == 0) + attacktable[RM][RL] = 0; + else if (RM == 15) + attacktable[RM][RL] = EG_DP_WIDTH; + else + attacktable[RM][RL] = (e_uint32) ((double) (1 << EG_DP_BITS) / (attacktime[RM][RL] * 3579545 / 72000)); + + } +#endif + + for (AR = 0; AR < 16; AR++) + for (Rks = 0; Rks < 16; Rks++) + { + RM = AR + (Rks >> 2); + RL = Rks & 3; + if (RM > 15) + RM = 15; + switch (AR) + { + case 0: + dphaseARTable[AR][Rks] = 0; + break; + case 15: + dphaseARTable[AR][Rks] = 0;/*EG_DP_WIDTH;*/ + break; + default: +#ifdef USE_SPEC_ENV_SPEED + dphaseARTable[AR][Rks] = RATE_ADJUST (attacktable[RM][RL]); +#else + dphaseARTable[AR][Rks] = RATE_ADJUST ((3 * (RL + 4) << (RM + 1))); +#endif + break; + } + } +} + +/* Rate Table for Decay and Release */ +static void +makeDphaseDRTable (void) +{ + e_int32 DR, Rks, RM, RL; + +#ifdef USE_SPEC_ENV_SPEED + e_uint32 decaytable[16][4]; + + for (RM = 0; RM < 16; RM++) + for (RL = 0; RL < 4; RL++) + if (RM == 0) + decaytable[RM][RL] = 0; + else + decaytable[RM][RL] = (e_uint32) ((double) (1 << EG_DP_BITS) / (decaytime[RM][RL] * 3579545 / 72000)); +#endif + + for (DR = 0; DR < 16; DR++) + for (Rks = 0; Rks < 16; Rks++) + { + RM = DR + (Rks >> 2); + RL = Rks & 3; + if (RM > 15) + RM = 15; + switch (DR) + { + case 0: + dphaseDRTable[DR][Rks] = 0; + break; + default: +#ifdef USE_SPEC_ENV_SPEED + dphaseDRTable[DR][Rks] = RATE_ADJUST (decaytable[RM][RL]); +#else + dphaseDRTable[DR][Rks] = RATE_ADJUST ((RL + 4) << (RM - 1)); +#endif + break; + } + } +} + +static void +makeRksTable (void) +{ + + e_int32 fnum8, block, KR; + + for (fnum8 = 0; fnum8 < 2; fnum8++) + for (block = 0; block < 8; block++) + for (KR = 0; KR < 2; KR++) + { + if (KR != 0) + rksTable[fnum8][block][KR] = (block << 1) + fnum8; + else + rksTable[fnum8][block][KR] = block >> 1; + } +} + +void +OPLL_dump2patch (const e_uint8 * dump, OPLL_PATCH * patch) +{ + patch[0].AM = (dump[0] >> 7) & 1; + patch[1].AM = (dump[1] >> 7) & 1; + patch[0].PM = (dump[0] >> 6) & 1; + patch[1].PM = (dump[1] >> 6) & 1; + patch[0].EG = (dump[0] >> 5) & 1; + patch[1].EG = (dump[1] >> 5) & 1; + patch[0].KR = (dump[0] >> 4) & 1; + patch[1].KR = (dump[1] >> 4) & 1; + patch[0].ML = (dump[0]) & 15; + patch[1].ML = (dump[1]) & 15; + patch[0].KL = (dump[2] >> 6) & 3; + patch[1].KL = (dump[3] >> 6) & 3; + patch[0].TL = (dump[2]) & 63; + patch[0].FB = (dump[3]) & 7; + patch[0].WF = (dump[3] >> 3) & 1; + patch[1].WF = (dump[3] >> 4) & 1; + patch[0].AR = (dump[4] >> 4) & 15; + patch[1].AR = (dump[5] >> 4) & 15; + patch[0].DR = (dump[4]) & 15; + patch[1].DR = (dump[5]) & 15; + patch[0].SL = (dump[6] >> 4) & 15; + patch[1].SL = (dump[7] >> 4) & 15; + patch[0].RR = (dump[6]) & 15; + patch[1].RR = (dump[7]) & 15; +} + +void +OPLL_getDefaultPatch (e_int32 type, e_int32 num, OPLL_PATCH * patch) +{ + OPLL_dump2patch (default_inst[type] + num * 16, patch); +} + +static void +makeDefaultPatch ( void ) +{ + e_int32 i, j; + + for (i = 0; i < OPLL_TONE_NUM; i++) + for (j = 0; j < 19; j++) + OPLL_getDefaultPatch (i, j, &default_patch[i][j * 2]); + +} + +void +OPLL_setPatch (OPLL * opll, const e_uint8 * dump) +{ + OPLL_PATCH patch[2]; + int i; + + for (i = 0; i < 19; i++) + { + OPLL_dump2patch (dump + i * 16, patch); + memcpy (&opll->patch[i*2+0], &patch[0], sizeof (OPLL_PATCH)); + memcpy (&opll->patch[i*2+1], &patch[1], sizeof (OPLL_PATCH)); + } +} + +void +OPLL_patch2dump (const OPLL_PATCH * patch, e_uint8 * dump) +{ + dump[0] = (e_uint8) ((patch[0].AM << 7) + (patch[0].PM << 6) + (patch[0].EG << 5) + (patch[0].KR << 4) + patch[0].ML); + dump[1] = (e_uint8) ((patch[1].AM << 7) + (patch[1].PM << 6) + (patch[1].EG << 5) + (patch[1].KR << 4) + patch[1].ML); + dump[2] = (e_uint8) ((patch[0].KL << 6) + patch[0].TL); + dump[3] = (e_uint8) ((patch[1].KL << 6) + (patch[1].WF << 4) + (patch[0].WF << 3) + patch[0].FB); + dump[4] = (e_uint8) ((patch[0].AR << 4) + patch[0].DR); + dump[5] = (e_uint8) ((patch[1].AR << 4) + patch[1].DR); + dump[6] = (e_uint8) ((patch[0].SL << 4) + patch[0].RR); + dump[7] = (e_uint8) ((patch[1].SL << 4) + patch[1].RR); + dump[8] = 0; + dump[9] = 0; + dump[10] = 0; + dump[11] = 0; + dump[12] = 0; + dump[13] = 0; + dump[14] = 0; + dump[15] = 0; +} + +/************************************************************ + + Calc Parameters + +************************************************************/ + +INLINE static e_uint32 +calc_eg_dphase (OPLL_SLOT * slot) +{ + + switch (slot->eg_mode) + { + case ATTACK: + return dphaseARTable[slot->patch->AR][slot->rks]; + + case DECAY: + return dphaseDRTable[slot->patch->DR][slot->rks]; + + case SUSHOLD: + return 0; + + case SUSTINE: + return dphaseDRTable[slot->patch->RR][slot->rks]; + + case RELEASE: + if (slot->sustine) + return dphaseDRTable[5][slot->rks]; + else if (slot->patch->EG) + return dphaseDRTable[slot->patch->RR][slot->rks]; + else + return dphaseDRTable[7][slot->rks]; + + case SETTLE: + return dphaseDRTable[15][0]; + + case FINISH: + return 0; + + default: + return 0; + } +} + +/************************************************************* + + OPLL internal interfaces + +*************************************************************/ +#define SLOT_BD1 12 +#define SLOT_BD2 13 +#define SLOT_HH 14 +#define SLOT_SD 15 +#define SLOT_TOM 16 +#define SLOT_CYM 17 + +/* We will set this dinamically, but not sure if this affects playback */ +#if defined(ROCKBOX) +INLINE static void +UPDATE_PG(OPLL_SLOT * slot) +{ + static const e_uint32 mltable[16] = + { 1, 1 * 2, 2 * 2, 3 * 2, 4 * 2, 5 * 2, 6 * 2, 7 * 2, 8 * 2, 9 * 2, 10 * 2, 10 * 2, 12 * 2, 12 * 2, 15 * 2, 15 * 2 }; + + slot->dphase = RATE_ADJUST (((slot->fnum * mltable[slot->patch->ML]) << slot->block) >> (20 - DP_BITS)); +} +#else +#define UPDATE_PG(S) (S)->dphase = dphaseTable[(S)->fnum][(S)->block][(S)->patch->ML] +#endif + +#define UPDATE_TLL(S)\ +(((S)->type==0)?\ +((S)->tll = tllTable[((S)->fnum)>>5][(S)->block][(S)->patch->TL][(S)->patch->KL]):\ +((S)->tll = tllTable[((S)->fnum)>>5][(S)->block][(S)->volume][(S)->patch->KL])) +#define UPDATE_RKS(S) (S)->rks = rksTable[((S)->fnum)>>8][(S)->block][(S)->patch->KR] +#define UPDATE_WF(S) (S)->sintbl = waveform[(S)->patch->WF] +#define UPDATE_EG(S) (S)->eg_dphase = calc_eg_dphase(S) +#define UPDATE_ALL(S)\ + UPDATE_PG(S);\ + UPDATE_TLL(S);\ + UPDATE_RKS(S);\ + UPDATE_WF(S); \ + UPDATE_EG(S) /* EG should be updated last. */ + + +/* Slot key on */ +INLINE static void +slotOn (OPLL_SLOT * slot) +{ + slot->eg_mode = ATTACK; + slot->eg_phase = 0; + slot->phase = 0; + UPDATE_EG(slot); +} + +/* Slot key on without reseting the phase */ +INLINE static void +slotOn2 (OPLL_SLOT * slot) +{ + slot->eg_mode = ATTACK; + slot->eg_phase = 0; + UPDATE_EG(slot); +} + +/* Slot key off */ +INLINE static void +slotOff (OPLL_SLOT * slot) +{ + if (slot->eg_mode == ATTACK) + slot->eg_phase = EXPAND_BITS (AR_ADJUST_TABLE(HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS)), EG_BITS, EG_DP_BITS); + slot->eg_mode = RELEASE; + UPDATE_EG(slot); +} + +/* Channel key on */ +INLINE static void +keyOn (OPLL * opll, e_int32 i) +{ + if (!opll->slot_on_flag[i * 2]) + slotOn (MOD(opll,i)); + if (!opll->slot_on_flag[i * 2 + 1]) + slotOn (CAR(opll,i)); + opll->key_status[i] = 1; +} + +/* Channel key off */ +INLINE static void +keyOff (OPLL * opll, e_int32 i) +{ + if (opll->slot_on_flag[i * 2 + 1]) + slotOff (CAR(opll,i)); + opll->key_status[i] = 0; +} + +INLINE static void +keyOn_BD (OPLL * opll) +{ + keyOn (opll, 6); +} +INLINE static void +keyOn_SD (OPLL * opll) +{ + if (!opll->slot_on_flag[SLOT_SD]) + slotOn (CAR(opll,7)); +} +INLINE static void +keyOn_TOM (OPLL * opll) +{ + if (!opll->slot_on_flag[SLOT_TOM]) + slotOn (MOD(opll,8)); +} +INLINE static void +keyOn_HH (OPLL * opll) +{ + if (!opll->slot_on_flag[SLOT_HH]) + slotOn2 (MOD(opll,7)); +} +INLINE static void +keyOn_CYM (OPLL * opll) +{ + if (!opll->slot_on_flag[SLOT_CYM]) + slotOn2 (CAR(opll,8)); +} + +/* Drum key off */ +INLINE static void +keyOff_BD (OPLL * opll) +{ + keyOff (opll, 6); +} +INLINE static void +keyOff_SD (OPLL * opll) +{ + if (opll->slot_on_flag[SLOT_SD]) + slotOff (CAR(opll,7)); +} +INLINE static void +keyOff_TOM (OPLL * opll) +{ + if (opll->slot_on_flag[SLOT_TOM]) + slotOff (MOD(opll,8)); +} +INLINE static void +keyOff_HH (OPLL * opll) +{ + if (opll->slot_on_flag[SLOT_HH]) + slotOff (MOD(opll,7)); +} +INLINE static void +keyOff_CYM (OPLL * opll) +{ + if (opll->slot_on_flag[SLOT_CYM]) + slotOff (CAR(opll,8)); +} + +/* Change a voice */ +INLINE static void +setPatch (OPLL * opll, e_int32 i, e_int32 num) +{ + opll->patch_number[i] = num; + MOD(opll,i)->patch = &opll->patch[num * 2 + 0]; + CAR(opll,i)->patch = &opll->patch[num * 2 + 1]; +} + +/* Change a rhythm voice */ +INLINE static void +setSlotPatch (OPLL_SLOT * slot, OPLL_PATCH * patch) +{ + slot->patch = patch; +} + +/* Set sustine parameter */ +INLINE static void +setSustine (OPLL * opll, e_int32 c, e_int32 sustine) +{ + CAR(opll,c)->sustine = sustine; + if (MOD(opll,c)->type) + MOD(opll,c)->sustine = sustine; +} + +/* Volume : 6bit ( Volume register << 2 ) */ +INLINE static void +setVolume (OPLL * opll, e_int32 c, e_int32 volume) +{ + CAR(opll,c)->volume = volume; +} + +INLINE static void +setSlotVolume (OPLL_SLOT * slot, e_int32 volume) +{ + slot->volume = volume; +} + +/* Set F-Number ( fnum : 9bit ) */ +INLINE static void +setFnumber (OPLL * opll, e_int32 c, e_int32 fnum) +{ + CAR(opll,c)->fnum = fnum; + MOD(opll,c)->fnum = fnum; +} + +/* Set Block data (block : 3bit ) */ +INLINE static void +setBlock (OPLL * opll, e_int32 c, e_int32 block) +{ + CAR(opll,c)->block = block; + MOD(opll,c)->block = block; +} + +/* Change Rhythm Mode */ +INLINE static void +update_rhythm_mode (OPLL * opll) +{ + if (opll->patch_number[6] & 0x10) + { + if (!(opll->slot_on_flag[SLOT_BD2] | (opll->reg[0x0e] & 32))) + { + opll->slot[SLOT_BD1].eg_mode = FINISH; + opll->slot[SLOT_BD2].eg_mode = FINISH; + setPatch (opll, 6, opll->reg[0x36] >> 4); + } + } + else if (opll->reg[0x0e] & 32) + { + opll->patch_number[6] = 16; + opll->slot[SLOT_BD1].eg_mode = FINISH; + opll->slot[SLOT_BD2].eg_mode = FINISH; + setSlotPatch (&opll->slot[SLOT_BD1], &opll->patch[16 * 2 + 0]); + setSlotPatch (&opll->slot[SLOT_BD2], &opll->patch[16 * 2 + 1]); + } + + if (opll->patch_number[7] & 0x10) + { + if (!((opll->slot_on_flag[SLOT_HH] && opll->slot_on_flag[SLOT_SD]) | (opll->reg[0x0e] & 32))) + { + opll->slot[SLOT_HH].type = 0; + opll->slot[SLOT_HH].eg_mode = FINISH; + opll->slot[SLOT_SD].eg_mode = FINISH; + setPatch (opll, 7, opll->reg[0x37] >> 4); + } + } + else if (opll->reg[0x0e] & 32) + { + opll->patch_number[7] = 17; + opll->slot[SLOT_HH].type = 1; + opll->slot[SLOT_HH].eg_mode = FINISH; + opll->slot[SLOT_SD].eg_mode = FINISH; + setSlotPatch (&opll->slot[SLOT_HH], &opll->patch[17 * 2 + 0]); + setSlotPatch (&opll->slot[SLOT_SD], &opll->patch[17 * 2 + 1]); + } + + if (opll->patch_number[8] & 0x10) + { + if (!((opll->slot_on_flag[SLOT_CYM] && opll->slot_on_flag[SLOT_TOM]) | (opll->reg[0x0e] & 32))) + { + opll->slot[SLOT_TOM].type = 0; + opll->slot[SLOT_TOM].eg_mode = FINISH; + opll->slot[SLOT_CYM].eg_mode = FINISH; + setPatch (opll, 8, opll->reg[0x38] >> 4); + } + } + else if (opll->reg[0x0e] & 32) + { + opll->patch_number[8] = 18; + opll->slot[SLOT_TOM].type = 1; + opll->slot[SLOT_TOM].eg_mode = FINISH; + opll->slot[SLOT_CYM].eg_mode = FINISH; + setSlotPatch (&opll->slot[SLOT_TOM], &opll->patch[18 * 2 + 0]); + setSlotPatch (&opll->slot[SLOT_CYM], &opll->patch[18 * 2 + 1]); + } +} + +INLINE static void +update_key_status (OPLL * opll) +{ + int ch; + + for (ch = 0; ch < 9; ch++) + opll->slot_on_flag[ch * 2] = opll->slot_on_flag[ch * 2 + 1] = (opll->reg[0x20 + ch]) & 0x10; + + if (opll->reg[0x0e] & 32) + { + opll->slot_on_flag[SLOT_BD1] |= (opll->reg[0x0e] & 0x10); + opll->slot_on_flag[SLOT_BD2] |= (opll->reg[0x0e] & 0x10); + opll->slot_on_flag[SLOT_SD] |= (opll->reg[0x0e] & 0x08); + opll->slot_on_flag[SLOT_HH] |= (opll->reg[0x0e] & 0x01); + opll->slot_on_flag[SLOT_TOM] |= (opll->reg[0x0e] & 0x04); + opll->slot_on_flag[SLOT_CYM] |= (opll->reg[0x0e] & 0x02); + } +} + +void +OPLL_copyPatch (OPLL * opll, e_int32 num, OPLL_PATCH * patch) +{ + memcpy (&opll->patch[num], patch, sizeof (OPLL_PATCH)); +} + +/*********************************************************** + + Initializing + +***********************************************************/ + +static void +OPLL_SLOT_reset (OPLL_SLOT * slot, int type) +{ + slot->type = type; + slot->sintbl = waveform[0]; + slot->phase = 0; + slot->dphase = 0; + slot->output[0] = 0; + slot->output[1] = 0; + slot->feedback = 0; + slot->eg_mode = FINISH; + slot->eg_phase = EG_DP_WIDTH; + slot->eg_dphase = 0; + slot->rks = 0; + slot->tll = 0; + slot->sustine = 0; + slot->fnum = 0; + slot->block = 0; + slot->volume = 0; + slot->pgout = 0; + slot->egout = 0; + slot->patch = &null_patch; +} + +static void +internal_refresh (void) +{ +#if !defined(ROCKBOX) + makeDphaseTable (); +#endif + makeDphaseARTable (); + makeDphaseDRTable (); + pm_dphase = (e_uint32) RATE_ADJUST ((int)(PM_SPEED * PM_DP_WIDTH) / (clk / 72)); + am_dphase = (e_uint32) RATE_ADJUST ((int)(AM_SPEED * AM_DP_WIDTH) / (clk / 72)); +} + +static void +maketables (e_uint32 c, e_uint32 r) +{ + if (c != clk) + { + clk = c; +#ifdef EMU2413_CALCUL_TABLES + makePmTable (); + makeAmTable (); + makeAdjustTable (); +#endif + makeDB2LinTable (); + makeTllTable (); + makeRksTable (); + makeSinTable (); + makeDefaultPatch (); + } + + if (r != rate) + { + rate = r; + internal_refresh (); + } +} + +void +OPLL_new (OPLL *opll, e_uint32 clk, e_uint32 rate) +{ + e_int32 i; + + maketables (clk, rate); + + memset(opll, 0, sizeof (OPLL)); + for (i = 0; i < 19 * 2; i++) + memcpy(&opll->patch[i],&null_patch,sizeof(OPLL_PATCH)); + + opll->mask = 0; + + OPLL_reset (opll); + OPLL_reset_patch (opll, 0); +} + + +void +OPLL_delete (OPLL * opll) +{ + (void) opll; +} + + +/* Reset patch datas by system default. */ +void +OPLL_reset_patch (OPLL * opll, e_int32 type) +{ + e_int32 i; + + for (i = 0; i < 19 * 2; i++) + OPLL_copyPatch (opll, i, &default_patch[type % OPLL_TONE_NUM][i]); +} + +/* Reset whole of OPLL except patch datas. */ +void +OPLL_reset (OPLL * opll) +{ + e_int32 i; + + if (!opll) + return; + + opll->adr = 0; + opll->out = 0; + + opll->pm_phase = 0; + opll->am_phase = 0; + + opll->noise_seed = 0xffff; + opll->mask = 0; + + for (i = 0; i <18; i++) + OPLL_SLOT_reset(&opll->slot[i], i%2); + + for (i = 0; i < 9; i++) + { + opll->key_status[i] = 0; + setPatch (opll, i, 0); + } + + for (i = 0; i < 0x40; i++) + OPLL_writeReg (opll, i, 0); + +#ifndef EMU2413_COMPACTION + opll->realstep = (e_uint32) ((1 << 31) / rate); + opll->opllstep = (e_uint32) ((1 << 31) / (clk / 72)); + opll->oplltime = 0; + for (i = 0; i < 14; i++) + opll->pan[i] = 2; + opll->sprev[0] = opll->sprev[1] = 0; + opll->snext[0] = opll->snext[1] = 0; +#endif +} + +/* Force Refresh (When external program changes some parameters). */ +void +OPLL_forceRefresh (OPLL * opll) +{ + e_int32 i; + + if (opll == NULL) + return; + + for (i = 0; i < 9; i++) + setPatch(opll,i,opll->patch_number[i]); + + for (i = 0; i < 18; i++) + { + UPDATE_PG (&opll->slot[i]); + UPDATE_RKS (&opll->slot[i]); + UPDATE_TLL (&opll->slot[i]); + UPDATE_WF (&opll->slot[i]); + UPDATE_EG (&opll->slot[i]); + } +} + +void +OPLL_set_rate (OPLL * opll, e_uint32 r) +{ + if (rate == r) return; + if (opll->quality) + rate = 49716; + else + rate = r; + internal_refresh (); + rate = r; +} + +void +OPLL_set_quality (OPLL * opll, e_uint32 q) +{ + opll->quality = q; + OPLL_set_rate (opll, rate); +} + +/********************************************************* + + Generate wave data + +*********************************************************/ +/* Convert Amp(0 to EG_HEIGHT) to Phase(0 to 2PI). */ +#if ( SLOT_AMP_BITS - PG_BITS ) > 0 +#define wave2_2pi(e) ( (e) >> ( SLOT_AMP_BITS - PG_BITS )) +#else +#define wave2_2pi(e) ( (e) << ( PG_BITS - SLOT_AMP_BITS )) +#endif + +/* Convert Amp(0 to EG_HEIGHT) to Phase(0 to 4PI). */ +#if ( SLOT_AMP_BITS - PG_BITS - 1 ) == 0 +#define wave2_4pi(e) (e) +#elif ( SLOT_AMP_BITS - PG_BITS - 1 ) > 0 +#define wave2_4pi(e) ( (e) >> ( SLOT_AMP_BITS - PG_BITS - 1 )) +#else +#define wave2_4pi(e) ( (e) << ( 1 + PG_BITS - SLOT_AMP_BITS )) +#endif + +/* Convert Amp(0 to EG_HEIGHT) to Phase(0 to 8PI). */ +#if ( SLOT_AMP_BITS - PG_BITS - 2 ) == 0 +#define wave2_8pi(e) (e) +#elif ( SLOT_AMP_BITS - PG_BITS - 2 ) > 0 +#define wave2_8pi(e) ( (e) >> ( SLOT_AMP_BITS - PG_BITS - 2 )) +#else +#define wave2_8pi(e) ( (e) << ( 2 + PG_BITS - SLOT_AMP_BITS )) +#endif + +/* Update AM, PM unit */ +INLINE static void +update_ampm (OPLL * opll) +{ + opll->pm_phase = (opll->pm_phase + pm_dphase) & (PM_DP_WIDTH - 1); + opll->am_phase = (opll->am_phase + am_dphase) & (AM_DP_WIDTH - 1); + opll->lfo_am = AMTABLE(HIGHBITS (opll->am_phase, AM_DP_BITS - AM_PG_BITS)); + opll->lfo_pm = PMTABLE(HIGHBITS (opll->pm_phase, PM_DP_BITS - PM_PG_BITS)); +} + +/* PG */ +INLINE static void +calc_phase (OPLL_SLOT * slot, e_int32 lfo) +{ + if (slot->patch->PM) + slot->phase += (slot->dphase * lfo) >> PM_AMP_BITS; + else + slot->phase += slot->dphase; + + slot->phase &= (DP_WIDTH - 1); + + slot->pgout = HIGHBITS (slot->phase, DP_BASE_BITS); +} + +/* Update Noise unit */ +INLINE static void +update_noise (OPLL * opll) +{ + if(opll->noise_seed&1) opll->noise_seed ^= 0x8003020; + opll->noise_seed >>= 1; +} + +/* EG */ +INLINE static void +calc_envelope (OPLL_SLOT * slot, e_int32 lfo) +{ +#define S2E(x) (SL2EG((e_int32)(x/SL_STEP))<<(EG_DP_BITS-EG_BITS)) + + static e_uint32 SL[16] = { + S2E (0.0), S2E (3.0), S2E (6.0), S2E (9.0), S2E (12.0), S2E (15.0), S2E (18.0), S2E (21.0), + S2E (24.0), S2E (27.0), S2E (30.0), S2E (33.0), S2E (36.0), S2E (39.0), S2E (42.0), S2E (48.0) + }; + + e_uint32 egout; + + switch (slot->eg_mode) + { + case ATTACK: + egout = AR_ADJUST_TABLE(HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS)); + slot->eg_phase += slot->eg_dphase; + if((EG_DP_WIDTH & slot->eg_phase)||(slot->patch->AR==15)) + { + egout = 0; + slot->eg_phase = 0; + slot->eg_mode = DECAY; + UPDATE_EG (slot); + } + break; + + case DECAY: + egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS); + slot->eg_phase += slot->eg_dphase; + if (slot->eg_phase >= SL[slot->patch->SL]) + { + if (slot->patch->EG) + { + slot->eg_phase = SL[slot->patch->SL]; + slot->eg_mode = SUSHOLD; + UPDATE_EG (slot); + } + else + { + slot->eg_phase = SL[slot->patch->SL]; + slot->eg_mode = SUSTINE; + UPDATE_EG (slot); + } + } + break; + + case SUSHOLD: + egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS); + if (slot->patch->EG == 0) + { + slot->eg_mode = SUSTINE; + UPDATE_EG (slot); + } + break; + + case SUSTINE: + case RELEASE: + egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS); + slot->eg_phase += slot->eg_dphase; + if (egout >= (1 << EG_BITS)) + { + slot->eg_mode = FINISH; + egout = (1 << EG_BITS) - 1; + } + break; + + case SETTLE: + egout = HIGHBITS (slot->eg_phase, EG_DP_BITS - EG_BITS); + slot->eg_phase += slot->eg_dphase; + if (egout >= (1 << EG_BITS)) + { + slot->eg_mode = ATTACK; + egout = (1 << EG_BITS) - 1; + UPDATE_EG(slot); + } + break; + + case FINISH: + egout = (1 << EG_BITS) - 1; + break; + + default: + egout = (1 << EG_BITS) - 1; + break; + } + + if (slot->patch->AM) + egout = EG2DB (egout + slot->tll) + lfo; + else + egout = EG2DB (egout + slot->tll); + + if (egout >= DB_MUTE) + egout = DB_MUTE - 1; + + slot->egout = egout | 3; +} + +/* CARRIOR */ +INLINE static e_int32 +calc_slot_car (OPLL_SLOT * slot, e_int32 fm) +{ + if (slot->egout >= (DB_MUTE - 1)) + { + slot->output[0] = 0; + } + else + { + slot->output[0] = DB2LIN_TABLE[slot->sintbl[(slot->pgout+wave2_8pi(fm))&(PG_WIDTH-1)] + slot->egout]; + } + + slot->output[1] = (slot->output[1] + slot->output[0]) >> 1; + return slot->output[1]; +} + +/* MODULATOR */ +INLINE static e_int32 +calc_slot_mod (OPLL_SLOT * slot) +{ + e_int32 fm; + + slot->output[1] = slot->output[0]; + + if (slot->egout >= (DB_MUTE - 1)) + { + slot->output[0] = 0; + } + else if (slot->patch->FB != 0) + { + fm = wave2_4pi (slot->feedback) >> (7 - slot->patch->FB); + slot->output[0] = DB2LIN_TABLE[slot->sintbl[(slot->pgout+fm)&(PG_WIDTH-1)] + slot->egout]; + } + else + { + slot->output[0] = DB2LIN_TABLE[slot->sintbl[slot->pgout] + slot->egout]; + } + + slot->feedback = (slot->output[1] + slot->output[0]) >> 1; + + return slot->feedback; + +} + +/* TOM */ +INLINE static e_int32 +calc_slot_tom (OPLL_SLOT * slot) +{ + if (slot->egout >= (DB_MUTE - 1)) + return 0; + + return DB2LIN_TABLE[slot->sintbl[slot->pgout] + slot->egout]; + +} + +/* SNARE */ +INLINE static e_int32 +calc_slot_snare (OPLL_SLOT * slot, e_uint32 noise) +{ + if(slot->egout>=(DB_MUTE-1)) + return 0; + + if(BIT(slot->pgout,7)) + return DB2LIN_TABLE[(noise?DB_POS(0):DB_POS(15))+slot->egout]; + else + return DB2LIN_TABLE[(noise?DB_NEG(0):DB_NEG(15))+slot->egout]; +} + +/* + TOP-CYM + */ +INLINE static e_int32 +calc_slot_cym (OPLL_SLOT * slot, e_uint32 pgout_hh) +{ + e_uint32 dbout; + + if (slot->egout >= (DB_MUTE - 1)) + return 0; + else if( + /* the same as fmopl.c */ + ((BIT(pgout_hh,PG_BITS-8)^BIT(pgout_hh,PG_BITS-1))|BIT(pgout_hh,PG_BITS-7)) ^ + /* different from fmopl.c */ + (BIT(slot->pgout,PG_BITS-7)&!BIT(slot->pgout,PG_BITS-5)) + ) + dbout = DB_NEG(3); + else + dbout = DB_POS(3); + + return DB2LIN_TABLE[dbout + slot->egout]; +} + +/* + HI-HAT +*/ +INLINE static e_int32 +calc_slot_hat (OPLL_SLOT *slot, e_int32 pgout_cym, e_uint32 noise) +{ + e_uint32 dbout; + + if (slot->egout >= (DB_MUTE - 1)) + return 0; + else if( + /* the same as fmopl.c */ + ((BIT(slot->pgout,PG_BITS-8)^BIT(slot->pgout,PG_BITS-1))|BIT(slot->pgout,PG_BITS-7)) ^ + /* different from fmopl.c */ + (BIT(pgout_cym,PG_BITS-7)&!BIT(pgout_cym,PG_BITS-5)) + ) + { + if(noise) + dbout = DB_NEG(12); + else + dbout = DB_NEG(24); + } + else + { + if(noise) + dbout = DB_POS(12); + else + dbout = DB_POS(24); + } + + return DB2LIN_TABLE[dbout + slot->egout]; +} + +static e_int16 +calc (OPLL * opll) EMU2413_CALC_ICODE; +static e_int16 +calc (OPLL * opll) +{ + e_int32 i; + + update_ampm (opll); + update_noise (opll); + + for (i = 0; i < 18; i++) + { + calc_phase(&opll->slot[i],opll->lfo_pm); + calc_envelope(&opll->slot[i],opll->lfo_am); + } + + e_uint32 channel_mask = opll->mask; + for (i = 0; i < 9; i++) { + if (CAR(opll,i)->eg_mode != FINISH) + channel_mask |= (1 << i); + } + + e_int32 mix = 0; + + /* CH6 */ + if (opll->patch_number[6] & 0x10) { + if (channel_mask & OPLL_MASK_CH (6)) { + mix += calc_slot_car (CAR(opll,6), calc_slot_mod(MOD(opll,6))); + channel_mask &= ~(1 << 6); + } + } + + /* CH7 */ + if (opll->patch_number[7] & 0x10) { + if (MOD(opll,7)->eg_mode != FINISH) + mix += calc_slot_hat (MOD(opll,7), CAR(opll,8)->pgout, opll->noise_seed&1); + if (channel_mask & OPLL_MASK_SD) { + mix -= calc_slot_snare (CAR(opll,7), opll->noise_seed&1); + channel_mask &= ~OPLL_MASK_SD; + } + } + + /* CH8 */ + if (opll->patch_number[8] & 0x10) { + if (MOD(opll,8)->eg_mode != FINISH) + mix += calc_slot_tom (MOD(opll,8)); + if (channel_mask & OPLL_MASK_CYM) { + mix -= calc_slot_cym (CAR(opll,8), MOD(opll,7)->pgout); + channel_mask &= ~OPLL_MASK_CYM; + } + } + + mix <<= 1; + + opll->current_mask = channel_mask; + for (i = 0; channel_mask; channel_mask >>= 1, ++i) { + if (channel_mask & 1) { + mix += calc_slot_car (CAR(opll,i), calc_slot_mod(MOD(opll,i))); + } + } + + return (e_int16) mix << 3; +} + +void +OPLL_set_internal_mute(OPLL * opll, e_uint32 mute) +{ + opll->internal_mute = mute; +} + +e_uint32 +OPLL_is_internal_muted(OPLL * opll) +{ + return opll->internal_mute; +} + +static e_uint32 +check_mute_helper(OPLL * opll) +{ + for (int i = 0; i < 6; i++) { + /* if (ch[i].car.eg_mode != FINISH) return 0; */ + if (!(opll->current_mask & OPLL_MASK_CH (i)) && (CAR(opll,i)->eg_mode != FINISH)) return 0; + } + + if (!(opll->reg[0x0e] & 0x20)) { + for(int i = 6; i < 9; i++) { + /* if (ch[i].car.eg_mode != FINISH) return 0; */ + if (!(opll->current_mask & OPLL_MASK_CH (i)) && (CAR(opll,i)->eg_mode != FINISH)) return 0; + } + } else { + /* if (ch[6].car.eg_mode != FINISH) return false; + if (ch[7].mod.eg_mode != FINISH) return false; + if (ch[7].car.eg_mode != FINISH) return false; + if (ch[8].mod.eg_mode != FINISH) return false; + if (ch[8].car.eg_mode != FINISH) return false; */ + if (!(opll->current_mask & OPLL_MASK_CH (6)) && (CAR(opll,6)->eg_mode != FINISH)) return 0; + if (!(opll->current_mask & OPLL_MASK_CH (7)) && (MOD(opll,7)->eg_mode != FINISH)) return 0; + if (!(opll->current_mask & OPLL_MASK_CH (7)) && (CAR(opll,7)->eg_mode != FINISH)) return 0; + if (!(opll->current_mask & OPLL_MASK_CH (8)) && (MOD(opll,8)->eg_mode != FINISH)) return 0; + if (!(opll->current_mask & OPLL_MASK_CH (8)) && (CAR(opll,8)->eg_mode != FINISH)) return 0; + } + + return 1; /* nothing is playing, then mute */ +} + +static void +check_mute(OPLL * opll) +{ + OPLL_set_internal_mute (opll, check_mute_helper (opll)); +} + +EMU2413_API e_int16 *OPLL_update_buffer(OPLL * opll, e_uint32 length) +{ + e_int16* buf = opll->buffer; + while (length--) { + *(buf++) = calc (opll); + } + check_mute (opll); + + return opll->buffer; +} + +#ifdef EMU2413_COMPACTION +e_int16 +OPLL_calc (OPLL * opll) +{ + return calc (opll); +} +#else +e_int16 +OPLL_calc (OPLL * opll) +{ + if (!opll->quality) + return calc (opll); + + while (opll->realstep > opll->oplltime) + { + opll->oplltime += opll->opllstep; + opll->prev = opll->next; + opll->next = calc (opll); + } + + opll->oplltime -= opll->realstep; + opll->out = (e_int16) (((double) opll->next * (opll->opllstep - opll->oplltime) + + (double) opll->prev * opll->oplltime) / opll->opllstep); + + return (e_int16) opll->out; +} +#endif + +e_uint32 +OPLL_setMask (OPLL * opll, e_uint32 mask) +{ + e_uint32 ret; + + if (opll) + { + ret = opll->mask; + opll->mask = mask; + return ret; + } + else + return 0; +} + +e_uint32 +OPLL_toggleMask (OPLL * opll, e_uint32 mask) +{ + e_uint32 ret; + + if (opll) + { + ret = opll->mask; + opll->mask ^= mask; + return ret; + } + else + return 0; +} + +/**************************************************** + + I/O Ctrl + +*****************************************************/ + +void +OPLL_writeReg (OPLL * opll, e_uint32 reg, e_uint32 data) +{ + e_int32 i, v, ch; + + data = data & 0xff; + reg = reg & 0x3f; + opll->reg[reg] = (e_uint8) data; + + switch (reg) + { + case 0x00: + opll->patch[0].AM = (data >> 7) & 1; + opll->patch[0].PM = (data >> 6) & 1; + opll->patch[0].EG = (data >> 5) & 1; + opll->patch[0].KR = (data >> 4) & 1; + opll->patch[0].ML = (data) & 15; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_PG (MOD(opll,i)); + UPDATE_RKS (MOD(opll,i)); + UPDATE_EG (MOD(opll,i)); + } + } + break; + + case 0x01: + opll->patch[1].AM = (data >> 7) & 1; + opll->patch[1].PM = (data >> 6) & 1; + opll->patch[1].EG = (data >> 5) & 1; + opll->patch[1].KR = (data >> 4) & 1; + opll->patch[1].ML = (data) & 15; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_PG (CAR(opll,i)); + UPDATE_RKS (CAR(opll,i)); + UPDATE_EG (CAR(opll,i)); + } + } + break; + + case 0x02: + opll->patch[0].KL = (data >> 6) & 3; + opll->patch[0].TL = (data) & 63; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_TLL(MOD(opll,i)); + } + } + break; + + case 0x03: + opll->patch[1].KL = (data >> 6) & 3; + opll->patch[1].WF = (data >> 4) & 1; + opll->patch[0].WF = (data >> 3) & 1; + opll->patch[0].FB = (data) & 7; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_WF(MOD(opll,i)); + UPDATE_WF(CAR(opll,i)); + } + } + break; + + case 0x04: + opll->patch[0].AR = (data >> 4) & 15; + opll->patch[0].DR = (data) & 15; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_EG (MOD(opll,i)); + } + } + break; + + case 0x05: + opll->patch[1].AR = (data >> 4) & 15; + opll->patch[1].DR = (data) & 15; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_EG(CAR(opll,i)); + } + } + break; + + case 0x06: + opll->patch[0].SL = (data >> 4) & 15; + opll->patch[0].RR = (data) & 15; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_EG (MOD(opll,i)); + } + } + break; + + case 0x07: + opll->patch[1].SL = (data >> 4) & 15; + opll->patch[1].RR = (data) & 15; + for (i = 0; i < 9; i++) + { + if (opll->patch_number[i] == 0) + { + UPDATE_EG (CAR(opll,i)); + } + } + break; + + case 0x0e: + update_rhythm_mode (opll); + if (data & 32) + { + if (data & 0x10) + keyOn_BD (opll); + else + keyOff_BD (opll); + if (data & 0x8) + keyOn_SD (opll); + else + keyOff_SD (opll); + if (data & 0x4) + keyOn_TOM (opll); + else + keyOff_TOM (opll); + if (data & 0x2) + keyOn_CYM (opll); + else + keyOff_CYM (opll); + if (data & 0x1) + keyOn_HH (opll); + else + keyOff_HH (opll); + } + update_key_status (opll); + + UPDATE_ALL (MOD(opll,6)); + UPDATE_ALL (CAR(opll,6)); + UPDATE_ALL (MOD(opll,7)); + UPDATE_ALL (CAR(opll,7)); + UPDATE_ALL (MOD(opll,8)); + UPDATE_ALL (CAR(opll,8)); + + break; + + case 0x0f: + break; + + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + ch = reg - 0x10; + setFnumber (opll, ch, data + ((opll->reg[0x20 + ch] & 1) << 8)); + UPDATE_ALL (MOD(opll,ch)); + UPDATE_ALL (CAR(opll,ch)); + break; + + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + ch = reg - 0x20; + setFnumber (opll, ch, ((data & 1) << 8) + opll->reg[0x10 + ch]); + setBlock (opll, ch, (data >> 1) & 7); + setSustine (opll, ch, (data >> 5) & 1); + if (data & 0x10) + keyOn (opll, ch); + else + keyOff (opll, ch); + UPDATE_ALL (MOD(opll,ch)); + UPDATE_ALL (CAR(opll,ch)); + update_key_status (opll); + update_rhythm_mode (opll); + break; + + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + i = (data >> 4) & 15; + v = data & 15; + if ((opll->reg[0x0e] & 32) && (reg >= 0x36)) + { + switch (reg) + { + case 0x37: + setSlotVolume (MOD(opll,7), i << 2); + break; + case 0x38: + setSlotVolume (MOD(opll,8), i << 2); + break; + default: + break; + } + } + else + { + setPatch (opll, reg - 0x30, i); + } + setVolume (opll, reg - 0x30, v << 2); + UPDATE_ALL (MOD(opll,reg - 0x30)); + UPDATE_ALL (CAR(opll,reg - 0x30)); + break; + + default: + break; + + } +} + +void +OPLL_writeIO (OPLL * opll, e_uint32 adr, e_uint32 val) +{ + if (adr & 1) + OPLL_writeReg (opll, opll->adr, val); + else + opll->adr = val; +} + +e_uint32 +OPLL_read(OPLL * opll, e_uint32 a) +{ + if( !(a&1) ) + { + /* status port */ + return opll->status; + } + return 0xff; +} + +#ifndef EMU2413_COMPACTION +/* STEREO MODE (OPT) */ +void +OPLL_set_pan (OPLL * opll, e_uint32 ch, e_uint32 pan) +{ + opll->pan[ch & 15] = pan & 3; +} + +static void +calc_stereo (OPLL * opll, e_int32 out[2]) +{ + e_int32 b[4] = { 0, 0, 0, 0 }; /* Ignore, Right, Left, Center */ + e_int32 r[4] = { 0, 0, 0, 0 }; /* Ignore, Right, Left, Center */ + e_int32 i; + + update_ampm (opll); + update_noise (opll); + + for(i=0;i<18;i++) + { + calc_phase(&opll->slot[i],opll->lfo_pm); + calc_envelope(&opll->slot[i],opll->lfo_am); + } + + for (i = 0; i < 6; i++) + if (!(opll->mask & OPLL_MASK_CH (i)) && (CAR(opll,i)->eg_mode != FINISH)) + b[opll->pan[i]] += calc_slot_car (CAR(opll,i), calc_slot_mod (MOD(opll,i))); + + + if (opll->patch_number[6] <= 15) + { + if (!(opll->mask & OPLL_MASK_CH (6)) && (CAR(opll,6)->eg_mode != FINISH)) + b[opll->pan[6]] += calc_slot_car (CAR(opll,6), calc_slot_mod (MOD(opll,6))); + } + else + { + if (!(opll->mask & OPLL_MASK_BD) && (CAR(opll,6)->eg_mode != FINISH)) + r[opll->pan[9]] += calc_slot_car (CAR(opll,6), calc_slot_mod (MOD(opll,6))); + } + + if (opll->patch_number[7] <= 15) + { + if (!(opll->mask & OPLL_MASK_CH (7)) && (CAR (opll,7)->eg_mode != FINISH)) + b[opll->pan[7]] += calc_slot_car (CAR (opll,7), calc_slot_mod (MOD (opll,7))); + } + else + { + if (!(opll->mask & OPLL_MASK_HH) && (MOD (opll,7)->eg_mode != FINISH)) + r[opll->pan[10]] += calc_slot_hat (MOD (opll,7), CAR(opll,8)->pgout, opll->noise_seed&1); + if (!(opll->mask & OPLL_MASK_SD) && (CAR (opll,7)->eg_mode != FINISH)) + r[opll->pan[11]] -= calc_slot_snare (CAR (opll,7), opll->noise_seed&1); + } + + if (opll->patch_number[8] <= 15) + { + if (!(opll->mask & OPLL_MASK_CH (8)) && (CAR (opll,8)->eg_mode != FINISH)) + b[opll->pan[8]] += calc_slot_car (CAR (opll,8), calc_slot_mod (MOD (opll,8))); + } + else + { + if (!(opll->mask & OPLL_MASK_TOM) && (MOD (opll,8)->eg_mode != FINISH)) + r[opll->pan[12]] += calc_slot_tom (MOD (opll,8)); + if (!(opll->mask & OPLL_MASK_CYM) && (CAR (opll,8)->eg_mode != FINISH)) + r[opll->pan[13]] -= calc_slot_cym (CAR (opll,8), MOD(opll,7)->pgout); + } + + out[1] = (b[1] + b[3] + ((r[1] + r[3]) << 1)) <<3; + out[0] = (b[2] + b[3] + ((r[2] + r[3]) << 1)) <<3; +} + +void +OPLL_calc_stereo (OPLL * opll, e_int32 out[2]) +{ + if (!opll->quality) + { + calc_stereo (opll, out); + return; + } + + while (opll->realstep > opll->oplltime) + { + opll->oplltime += opll->opllstep; + opll->sprev[0] = opll->snext[0]; + opll->sprev[1] = opll->snext[1]; + calc_stereo (opll, opll->snext); + } + + opll->oplltime -= opll->realstep; + out[0] = (e_int16) (((double) opll->snext[0] * (opll->opllstep - opll->oplltime) + + (double) opll->sprev[0] * opll->oplltime) / opll->opllstep); + out[1] = (e_int16) (((double) opll->snext[1] * (opll->opllstep - opll->oplltime) + + (double) opll->sprev[1] * opll->oplltime) / opll->opllstep); +} +#endif /* EMU2413_COMPACTION */ diff --git a/apps/codecs/libgme/emu2413.h b/apps/codecs/libgme/emu2413.h index 6a19b10..254f042 100644 --- a/apps/codecs/libgme/emu2413.h +++ b/apps/codecs/libgme/emu2413.h @@ -1,164 +1,164 @@ -#ifndef _EMU2413_H_
-#define _EMU2413_H_
-
-#include "blargg_common.h"
-#include "emutypes.h"
-
-#ifdef EMU2413_DLL_EXPORTS
- #define EMU2413_API __declspec(dllexport)
-#elif defined(EMU2413_DLL_IMPORTS)
- #define EMU2413_API __declspec(dllimport)
-#else
- #define EMU2413_API
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define AUDIO_MONO_BUFFER_SIZE 1024
-
-#define PI 3.14159265358979323846
-
-enum OPLL_TONE_ENUM {OPLL_2413_TONE=0, OPLL_VRC7_TONE=1, OPLL_281B_TONE=2} ;
-
-/* voice data */
-typedef struct __OPLL_PATCH {
- e_uint32 TL,FB,EG,ML,AR,DR,SL,RR,KR,KL,AM,PM,WF ;
-} OPLL_PATCH ;
-
-/* slot */
-typedef struct __OPLL_SLOT {
-
- OPLL_PATCH *patch;
-
- e_int32 type ; /* 0 : modulator 1 : carrier */
-
- /* OUTPUT */
- e_int32 feedback ;
- e_int32 output[2] ; /* Output value of slot */
-
- /* for Phase Generator (PG) */
- e_uint16 *sintbl ; /* Wavetable */
- e_uint32 phase ; /* Phase */
- e_uint32 dphase ; /* Phase increment amount */
- e_uint32 pgout ; /* output */
-
- /* for Envelope Generator (EG) */
- e_int32 fnum ; /* F-Number */
- e_int32 block ; /* Block */
- e_int32 volume ; /* Current volume */
- e_int32 sustine ; /* Sustine 1 = ON, 0 = OFF */
- e_uint32 tll ; /* Total Level + Key scale level*/
- e_uint32 rks ; /* Key scale offset (Rks) */
- e_int32 eg_mode ; /* Current state */
- e_uint32 eg_phase ; /* Phase */
- e_uint32 eg_dphase ; /* Phase increment amount */
- e_uint32 egout ; /* output */
-
-} OPLL_SLOT ;
-
-/* Mask */
-#define OPLL_MASK_CH(x) (1<<(x))
-#define OPLL_MASK_HH (1<<(9))
-#define OPLL_MASK_CYM (1<<(10))
-#define OPLL_MASK_TOM (1<<(11))
-#define OPLL_MASK_SD (1<<(12))
-#define OPLL_MASK_BD (1<<(13))
-#define OPLL_MASK_RHYTHM ( OPLL_MASK_HH | OPLL_MASK_CYM | OPLL_MASK_TOM | OPLL_MASK_SD | OPLL_MASK_BD )
-
-/* opll */
-typedef struct __OPLL {
-
- e_uint32 adr ;
- e_int32 out ;
-
-#ifndef EMU2413_COMPACTION
- e_uint32 realstep ;
- e_uint32 oplltime ;
- e_uint32 opllstep ;
- e_int32 prev, next ;
- e_int32 sprev[2],snext[2];
- e_uint32 pan[16];
-#endif
-
- /* Register */
- e_uint8 reg[0x40] ;
- e_int32 slot_on_flag[18] ;
-
- /* Pitch Modulator */
- e_uint32 pm_phase ;
- e_int32 lfo_pm ;
-
- /* Amp Modulator */
- e_int32 am_phase ;
- e_int32 lfo_am ;
-
- e_uint32 quality;
-
- /* Noise Generator */
- e_uint32 noise_seed ;
-
- /* Channel Data */
- e_int32 patch_number[9];
- e_int32 key_status[9] ;
-
- /* Slot */
- OPLL_SLOT slot[18] ;
-
- /* Voice Data */
- OPLL_PATCH patch[19*2] ;
- e_int32 patch_update[2] ; /* flag for check patch update */
-
- e_uint32 mask ;
- e_uint32 current_mask;
- e_uint32 status;
-
- e_uint32 internal_mute;
- e_int16 buffer[AUDIO_MONO_BUFFER_SIZE];
-} OPLL ;
-
-/* Create Object */
-EMU2413_API void OPLL_new(OPLL *, e_uint32 clk, e_uint32 rate) ;
-EMU2413_API void OPLL_delete(OPLL *) ;
-
-/* Setup */
-EMU2413_API void OPLL_reset(OPLL *) ;
-EMU2413_API void OPLL_reset_patch(OPLL *, e_int32) ;
-EMU2413_API void OPLL_set_rate(OPLL *opll, e_uint32 r) ;
-EMU2413_API void OPLL_set_quality(OPLL *opll, e_uint32 q) ;
-EMU2413_API void OPLL_set_pan(OPLL *, e_uint32 ch, e_uint32 pan);
-EMU2413_API void OPLL_set_internal_mute(OPLL *, e_uint32 mute);
-EMU2413_API e_uint32 OPLL_is_internal_muted(OPLL *);
-
-/* Port/Register access */
-EMU2413_API void OPLL_writeIO(OPLL *, e_uint32 reg, e_uint32 val);
-EMU2413_API void OPLL_writeReg(OPLL *, e_uint32 reg, e_uint32 val);
-EMU2413_API e_uint32 OPLL_read(OPLL *, e_uint32 port);
-
-/* Synthsize */
-EMU2413_API e_int16 OPLL_calc(OPLL *) EMU2413_CALC_ICODE;
-EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ;
-EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ;
-
-/* Misc */
-EMU2413_API void OPLL_setPatch(OPLL *, const e_uint8 *dump) ;
-EMU2413_API void OPLL_copyPatch(OPLL *, e_int32, OPLL_PATCH *) ;
-EMU2413_API void OPLL_forceRefresh(OPLL *) ;
-/* Utility */
-EMU2413_API void OPLL_dump2patch(const e_uint8 *dump, OPLL_PATCH *patch) ;
-EMU2413_API void OPLL_patch2dump(const OPLL_PATCH *patch, e_uint8 *dump) ;
-EMU2413_API void OPLL_getDefaultPatch(e_int32 type, e_int32 num, OPLL_PATCH *) ;
-
-/* Channel Mask */
-EMU2413_API e_uint32 OPLL_setMask(OPLL *, e_uint32 mask) ;
-EMU2413_API e_uint32 OPLL_toggleMask(OPLL *, e_uint32 mask) ;
-
-#define dump2patch OPLL_dump2patch
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+#ifndef _EMU2413_H_ +#define _EMU2413_H_ + +#include "blargg_common.h" +#include "emutypes.h" + +#ifdef EMU2413_DLL_EXPORTS + #define EMU2413_API __declspec(dllexport) +#elif defined(EMU2413_DLL_IMPORTS) + #define EMU2413_API __declspec(dllimport) +#else + #define EMU2413_API +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define AUDIO_MONO_BUFFER_SIZE 1024 + +#define PI 3.14159265358979323846 + +enum OPLL_TONE_ENUM {OPLL_2413_TONE=0, OPLL_VRC7_TONE=1, OPLL_281B_TONE=2} ; + +/* voice data */ +typedef struct __OPLL_PATCH { + e_uint32 TL,FB,EG,ML,AR,DR,SL,RR,KR,KL,AM,PM,WF ; +} OPLL_PATCH ; + +/* slot */ +typedef struct __OPLL_SLOT { + + OPLL_PATCH *patch; + + e_int32 type ; /* 0 : modulator 1 : carrier */ + + /* OUTPUT */ + e_int32 feedback ; + e_int32 output[2] ; /* Output value of slot */ + + /* for Phase Generator (PG) */ + e_uint16 *sintbl ; /* Wavetable */ + e_uint32 phase ; /* Phase */ + e_uint32 dphase ; /* Phase increment amount */ + e_uint32 pgout ; /* output */ + + /* for Envelope Generator (EG) */ + e_int32 fnum ; /* F-Number */ + e_int32 block ; /* Block */ + e_int32 volume ; /* Current volume */ + e_int32 sustine ; /* Sustine 1 = ON, 0 = OFF */ + e_uint32 tll ; /* Total Level + Key scale level*/ + e_uint32 rks ; /* Key scale offset (Rks) */ + e_int32 eg_mode ; /* Current state */ + e_uint32 eg_phase ; /* Phase */ + e_uint32 eg_dphase ; /* Phase increment amount */ + e_uint32 egout ; /* output */ + +} OPLL_SLOT ; + +/* Mask */ +#define OPLL_MASK_CH(x) (1<<(x)) +#define OPLL_MASK_HH (1<<(9)) +#define OPLL_MASK_CYM (1<<(10)) +#define OPLL_MASK_TOM (1<<(11)) +#define OPLL_MASK_SD (1<<(12)) +#define OPLL_MASK_BD (1<<(13)) +#define OPLL_MASK_RHYTHM ( OPLL_MASK_HH | OPLL_MASK_CYM | OPLL_MASK_TOM | OPLL_MASK_SD | OPLL_MASK_BD ) + +/* opll */ +typedef struct __OPLL { + + e_uint32 adr ; + e_int32 out ; + +#ifndef EMU2413_COMPACTION + e_uint32 realstep ; + e_uint32 oplltime ; + e_uint32 opllstep ; + e_int32 prev, next ; + e_int32 sprev[2],snext[2]; + e_uint32 pan[16]; +#endif + + /* Register */ + e_uint8 reg[0x40] ; + e_int32 slot_on_flag[18] ; + + /* Pitch Modulator */ + e_uint32 pm_phase ; + e_int32 lfo_pm ; + + /* Amp Modulator */ + e_int32 am_phase ; + e_int32 lfo_am ; + + e_uint32 quality; + + /* Noise Generator */ + e_uint32 noise_seed ; + + /* Channel Data */ + e_int32 patch_number[9]; + e_int32 key_status[9] ; + + /* Slot */ + OPLL_SLOT slot[18] ; + + /* Voice Data */ + OPLL_PATCH patch[19*2] ; + e_int32 patch_update[2] ; /* flag for check patch update */ + + e_uint32 mask ; + e_uint32 current_mask; + e_uint32 status; + + e_uint32 internal_mute; + e_int16 buffer[AUDIO_MONO_BUFFER_SIZE]; +} OPLL ; + +/* Create Object */ +EMU2413_API void OPLL_new(OPLL *, e_uint32 clk, e_uint32 rate) ; +EMU2413_API void OPLL_delete(OPLL *) ; + +/* Setup */ +EMU2413_API void OPLL_reset(OPLL *) ; +EMU2413_API void OPLL_reset_patch(OPLL *, e_int32) ; +EMU2413_API void OPLL_set_rate(OPLL *opll, e_uint32 r) ; +EMU2413_API void OPLL_set_quality(OPLL *opll, e_uint32 q) ; +EMU2413_API void OPLL_set_pan(OPLL *, e_uint32 ch, e_uint32 pan); +EMU2413_API void OPLL_set_internal_mute(OPLL *, e_uint32 mute); +EMU2413_API e_uint32 OPLL_is_internal_muted(OPLL *); + +/* Port/Register access */ +EMU2413_API void OPLL_writeIO(OPLL *, e_uint32 reg, e_uint32 val); +EMU2413_API void OPLL_writeReg(OPLL *, e_uint32 reg, e_uint32 val); +EMU2413_API e_uint32 OPLL_read(OPLL *, e_uint32 port); + +/* Synthsize */ +EMU2413_API e_int16 OPLL_calc(OPLL *) EMU2413_CALC_ICODE; +EMU2413_API void OPLL_calc_stereo(OPLL *, e_int32 out[2]) ; +EMU2413_API e_int16 *OPLL_update_buffer(OPLL *, e_uint32 length) ; + +/* Misc */ +EMU2413_API void OPLL_setPatch(OPLL *, const e_uint8 *dump) ; +EMU2413_API void OPLL_copyPatch(OPLL *, e_int32, OPLL_PATCH *) ; +EMU2413_API void OPLL_forceRefresh(OPLL *) ; +/* Utility */ +EMU2413_API void OPLL_dump2patch(const e_uint8 *dump, OPLL_PATCH *patch) ; +EMU2413_API void OPLL_patch2dump(const OPLL_PATCH *patch, e_uint8 *dump) ; +EMU2413_API void OPLL_getDefaultPatch(e_int32 type, e_int32 num, OPLL_PATCH *) ; + +/* Channel Mask */ +EMU2413_API e_uint32 OPLL_setMask(OPLL *, e_uint32 mask) ; +EMU2413_API e_uint32 OPLL_toggleMask(OPLL *, e_uint32 mask) ; + +#define dump2patch OPLL_dump2patch + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/apps/codecs/libgme/emutables.h b/apps/codecs/libgme/emutables.h index e34f100..739c8c3 100644 --- a/apps/codecs/libgme/emutables.h +++ b/apps/codecs/libgme/emutables.h @@ -1,210 +1,210 @@ -#ifndef _EMUTABLES_H_
-#define _EMUTABLES_H_
-
-/* Precalculated emu2413 tables for use in Rockbox,
- Calculated for 44Khz sampling rate */
-
-#include "emutypes.h"
-
-static const e_uint16 sin_coeff[] = {
- 255, 203, 171, 152, 139, 129, 120,
- 113, 107, 102, 97, 92, 88, 85,
- 81, 78, 75, 72, 70, 67, 65,
- 63, 61, 59, 57, 55, 53, 52,
- 50, 48, 47, 45, 44, 43, 41,
- 40, 39, 38, 37, 35, 34, 33,
- 32, 31, 30, 29, 28, 28, 27,
- 26, 25, 24, 23, 23, 22, 21,
- 21, 20, 19, 19, 18, 17, 17,
- 16, 16, 15, 14, 14, 13, 13,
- 12, 12, 11, 11, 11, 10, 10,
- 9, 9, 8, 8, 8, 7, 7,
- 7, 6, 6, 6, 5, 5, 5,
- 4, 4, 4, 4, 3, 3, 3,
- 3, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0,
-};
-
-static const e_int16 pm_coeff[] = {
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 258, 258, 258, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 253, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254,
- 254, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255,
-};
-
-static const e_int8 am_coeff[] = {
- 13, 13, 13, 13, 13, 14, 14,
- 14, 14, 14, 15, 15, 15, 15,
- 15, 16, 16, 16, 16, 16, 17,
- 17, 17, 17, 17, 18, 18, 18,
- 18, 18, 19, 19, 19, 19, 19,
- 20, 20, 20, 20, 20, 21, 21,
- 21, 21, 21, 22, 22, 22, 22,
- 22, 23, 23, 23, 23, 23, 24,
- 24, 24, 24, 24, 25, 25, 25,
- 25, 26, 25, 25, 25, 25, 24,
- 24, 24, 24, 24, 23, 23, 23,
- 23, 23, 22, 22, 22, 22, 22,
- 21, 21, 21, 21, 21, 20, 20,
- 20, 20, 20, 19, 19, 19, 19,
- 19, 18, 18, 18, 18, 18, 17,
- 17, 17, 17, 17, 16, 16, 16,
- 16, 16, 15, 15, 15, 15, 15,
- 14, 14, 14, 14, 14, 13, 13,
- 13, 13, 13, 12, 12, 12, 12,
- 11, 11, 11, 11, 11, 10, 10,
- 10, 10, 10, 9, 9, 9, 9,
- 9, 8, 8, 8, 8, 8, 7,
- 7, 7, 7, 7, 6, 6, 6,
- 6, 6, 5, 5, 5, 5, 5,
- 4, 4, 4, 4, 4, 3, 3,
- 3, 3, 3, 2, 2, 2, 2,
- 2, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 3, 3, 3,
- 3, 3, 4, 4, 4, 4, 4,
- 5, 5, 5, 5, 5, 6, 6,
- 6, 6, 6, 7, 7, 7, 7,
- 7, 8, 8, 8, 8, 8, 9,
- 9, 9, 9, 9, 10, 10, 10,
- 10, 10, 11, 11, 11, 11, 11,
- 12, 12, 12, 12,
-};
-
-static const e_int16 db2lin_coeff[] = {
- 255, 249, 244, 239, 233, 228, 224,
- 219, 214, 209, 205, 201, 196, 192,
- 188, 184, 180, 176, 172, 169, 165,
- 162, 158, 155, 151, 148, 145, 142,
- 139, 136, 133, 130, 127, 125, 122,
- 119, 117, 114, 112, 109, 107, 105,
- 102, 100, 98, 96, 94, 92, 90,
- 88, 86, 84, 82, 81, 79, 77,
- 76, 74, 72, 71, 69, 68, 66,
- 65, 64, 62, 61, 60, 58, 57,
- 56, 55, 53, 52, 51, 50, 49,
- 48, 47, 46, 45, 44, 43, 42,
- 41, 40, 39, 38, 38, 37, 36,
- 35, 34, 34, 33, 32, 32, 31,
- 30, 30, 29, 28, 28, 27, 27,
- 26, 25, 25, 24, 24, 23, 23,
- 22, 22, 21, 21, 20, 20, 19,
- 19, 19, 18, 18, 17, 17, 17,
- 16, 16, 16, 15, 15, 15, 14,
- 14, 14, 13, 13, 13, 12, 12,
- 12, 12, 11, 11, 11, 11, 10,
- 10, 10, 10, 10, 9, 9, 9,
- 9, 8, 8, 8, 8, 8, 8,
- 7, 7, 7, 7, 7, 7, 6,
- 6, 6, 6, 6, 6, 6, 5,
- 5, 5, 5, 5, 5, 5, 5,
- 5, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2,
- 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0,
-};
-
-static const e_uint16 ar_adjust_coeff[] = {
- 127, 108, 98, 90, 84, 80, 75,
- 72, 69, 66, 64, 61, 59, 57,
- 56, 54, 52, 51, 49, 48, 47,
- 45, 44, 43, 42, 41, 40, 39,
- 38, 37, 36, 36, 35, 34, 33,
- 33, 32, 31, 30, 30, 29, 29,
- 28, 27, 27, 26, 26, 25, 24,
- 24, 23, 23, 22, 22, 21, 21,
- 21, 20, 20, 19, 19, 18, 18,
- 17, 17, 17, 16, 16, 15, 15,
- 15, 14, 14, 14, 13, 13, 13,
- 12, 12, 12, 11, 11, 11, 10,
- 10, 10, 9, 9, 9, 9, 8,
- 8, 8, 7, 7, 7, 7, 6,
- 6, 6, 6, 5, 5, 5, 4,
- 4, 4, 4, 4, 3, 3, 3,
- 3, 2, 2, 2, 2, 1, 1,
- 1, 1, 1, 0, 0, 0, 0,
- 0,
-};
-
-#endif
+#ifndef _EMUTABLES_H_ +#define _EMUTABLES_H_ + +/* Precalculated emu2413 tables for use in Rockbox, + Calculated for 44Khz sampling rate */ + +#include "emutypes.h" + +static const e_uint16 sin_coeff[] = { + 255, 203, 171, 152, 139, 129, 120, + 113, 107, 102, 97, 92, 88, 85, + 81, 78, 75, 72, 70, 67, 65, + 63, 61, 59, 57, 55, 53, 52, + 50, 48, 47, 45, 44, 43, 41, + 40, 39, 38, 37, 35, 34, 33, + 32, 31, 30, 29, 28, 28, 27, + 26, 25, 24, 23, 23, 22, 21, + 21, 20, 19, 19, 18, 17, 17, + 16, 16, 15, 14, 14, 13, 13, + 12, 12, 11, 11, 11, 10, 10, + 9, 9, 8, 8, 8, 7, 7, + 7, 6, 6, 6, 5, 5, 5, + 4, 4, 4, 4, 3, 3, 3, + 3, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, +}; + +static const e_int16 pm_coeff[] = { + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 258, 258, 258, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 253, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, + 254, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, +}; + +static const e_int8 am_coeff[] = { + 13, 13, 13, 13, 13, 14, 14, + 14, 14, 14, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 18, 18, 18, + 18, 18, 19, 19, 19, 19, 19, + 20, 20, 20, 20, 20, 21, 21, + 21, 21, 21, 22, 22, 22, 22, + 22, 23, 23, 23, 23, 23, 24, + 24, 24, 24, 24, 25, 25, 25, + 25, 26, 25, 25, 25, 25, 24, + 24, 24, 24, 24, 23, 23, 23, + 23, 23, 22, 22, 22, 22, 22, + 21, 21, 21, 21, 21, 20, 20, + 20, 20, 20, 19, 19, 19, 19, + 19, 18, 18, 18, 18, 18, 17, + 17, 17, 17, 17, 16, 16, 16, + 16, 16, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 12, 12, 12, 12, + 11, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 9, 9, 9, 9, + 9, 8, 8, 8, 8, 8, 7, + 7, 7, 7, 7, 6, 6, 6, + 6, 6, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 3, 3, + 3, 3, 3, 2, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 6, 6, + 6, 6, 6, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, + 12, 12, 12, 12, +}; + +static const e_int16 db2lin_coeff[] = { + 255, 249, 244, 239, 233, 228, 224, + 219, 214, 209, 205, 201, 196, 192, + 188, 184, 180, 176, 172, 169, 165, + 162, 158, 155, 151, 148, 145, 142, + 139, 136, 133, 130, 127, 125, 122, + 119, 117, 114, 112, 109, 107, 105, + 102, 100, 98, 96, 94, 92, 90, + 88, 86, 84, 82, 81, 79, 77, + 76, 74, 72, 71, 69, 68, 66, + 65, 64, 62, 61, 60, 58, 57, + 56, 55, 53, 52, 51, 50, 49, + 48, 47, 46, 45, 44, 43, 42, + 41, 40, 39, 38, 38, 37, 36, + 35, 34, 34, 33, 32, 32, 31, + 30, 30, 29, 28, 28, 27, 27, + 26, 25, 25, 24, 24, 23, 23, + 22, 22, 21, 21, 20, 20, 19, + 19, 19, 18, 18, 17, 17, 17, + 16, 16, 16, 15, 15, 15, 14, + 14, 14, 13, 13, 13, 12, 12, + 12, 12, 11, 11, 11, 11, 10, + 10, 10, 10, 10, 9, 9, 9, + 9, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 6, + 6, 6, 6, 6, 6, 6, 5, + 5, 5, 5, 5, 5, 5, 5, + 5, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const e_uint16 ar_adjust_coeff[] = { + 127, 108, 98, 90, 84, 80, 75, + 72, 69, 66, 64, 61, 59, 57, + 56, 54, 52, 51, 49, 48, 47, + 45, 44, 43, 42, 41, 40, 39, + 38, 37, 36, 36, 35, 34, 33, + 33, 32, 31, 30, 30, 29, 29, + 28, 27, 27, 26, 26, 25, 24, + 24, 23, 23, 22, 22, 21, 21, + 21, 20, 20, 19, 19, 18, 18, + 17, 17, 17, 16, 16, 15, 15, + 15, 14, 14, 14, 13, 13, 13, + 12, 12, 12, 11, 11, 11, 10, + 10, 10, 9, 9, 9, 9, 8, + 8, 8, 7, 7, 7, 7, 6, + 6, 6, 6, 5, 5, 5, 4, + 4, 4, 4, 4, 3, 3, 3, + 3, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 0, 0, 0, 0, + 0, +}; + +#endif diff --git a/apps/codecs/libgme/emutypes.h b/apps/codecs/libgme/emutypes.h index bf5d7e1..bc523db 100644 --- a/apps/codecs/libgme/emutypes.h +++ b/apps/codecs/libgme/emutypes.h @@ -1,41 +1,41 @@ -#ifndef _EMUTYPES_H_
-#define _EMUTYPES_H_
-
-#if defined(_MSC_VER)
-#define INLINE __forceinline
-#elif defined(__GNUC__)
-#define INLINE __inline__
-#elif defined(_MWERKS_)
-#define INLINE inline
-#else
-#define INLINE
-#endif
-
-#if defined(EMU_DLL_IMPORTS)
-#define EMU2149_DLL_IMPORTS
-#define EMU2212_DLL_IMPORTS
-#define EMU2413_DLL_IMPORTS
-#define EMU8950_DLL_IMPORTS
-#define EMU76489_DLL_IMPORTS
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef unsigned int e_uint;
-typedef signed int e_int;
-
-typedef unsigned char e_uint8 ;
-typedef signed char e_int8 ;
-
-typedef unsigned short e_uint16 ;
-typedef signed short e_int16 ;
-
-typedef unsigned int e_uint32 ;
-typedef signed int e_int32 ;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
+#ifndef _EMUTYPES_H_ +#define _EMUTYPES_H_ + +#if defined(_MSC_VER) +#define INLINE __forceinline +#elif defined(__GNUC__) +#define INLINE __inline__ +#elif defined(_MWERKS_) +#define INLINE inline +#else +#define INLINE +#endif + +#if defined(EMU_DLL_IMPORTS) +#define EMU2149_DLL_IMPORTS +#define EMU2212_DLL_IMPORTS +#define EMU2413_DLL_IMPORTS +#define EMU8950_DLL_IMPORTS +#define EMU76489_DLL_IMPORTS +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef unsigned int e_uint; +typedef signed int e_int; + +typedef unsigned char e_uint8 ; +typedef signed char e_int8 ; + +typedef unsigned short e_uint16 ; +typedef signed short e_int16 ; + +typedef unsigned int e_uint32 ; +typedef signed int e_int32 ; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/apps/codecs/libgme/hes_apu_adpcm.c b/apps/codecs/libgme/hes_apu_adpcm.c index 69ac712..de9b894 100644 --- a/apps/codecs/libgme/hes_apu_adpcm.c +++ b/apps/codecs/libgme/hes_apu_adpcm.c @@ -1,297 +1,297 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-#include "hes_apu_adpcm.h"
-
-/* Copyright (C) 2006-2008 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-
-void Adpcm_init( struct Hes_Apu_Adpcm* this )
-{
- this->output = NULL;
- memset( &this->state, 0, sizeof( this->state ) );
- Adpcm_reset( this );
-}
-
-void Adpcm_reset( struct Hes_Apu_Adpcm* this )
-{
- this->last_time = 0;
- this->next_timer = 0;
- this->last_amp = 0;
-
- memset( &this->state.pcmbuf, 0, sizeof(this->state.pcmbuf) );
- memset( &this->state.port, 0, sizeof(this->state.port) );
-
- this->state.ad_sample = 0;
- this->state.ad_ref_index = 0;
-
- this->state.addr = 0;
- this->state.freq = 0;
- this->state.writeptr = 0;
- this->state.readptr = 0;
- this->state.playflag = 0;
- this->state.repeatflag = 0;
- this->state.length = 0;
- this->state.volume = 0xFF;
- this->state.fadetimer = 0;
- this->state.fadecount = 0;
-}
-
-static short stepsize[49] = {
- 16, 17, 19, 21, 23, 25, 28,
- 31, 34, 37, 41, 45, 50, 55,
- 60, 66, 73, 80, 88, 97, 107,
- 118, 130, 143, 157, 173, 190, 209,
- 230, 253, 279, 307, 337, 371, 408,
- 449, 494, 544, 598, 658, 724, 796,
- 876, 963,1060,1166,1282,1411,1552
-};
-
-static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code );
-static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code )
-{
- struct State* state = &this->state;
- int step = stepsize[state->ad_ref_index];
- int delta;
- int c = code & 7;
-#if 1
- delta = 0;
- if ( c & 4 ) delta += step;
- step >>= 1;
- if ( c & 2 ) delta += step;
- step >>= 1;
- if ( c & 1 ) delta += step;
- step >>= 1;
- delta += step;
-#else
- delta = ( ( c + c + 1 ) * step ) / 8; // maybe faster, but introduces rounding
-#endif
- if ( c != code )
- {
- state->ad_sample -= delta;
- if ( state->ad_sample < -2048 )
- state->ad_sample = -2048;
- }
- else
- {
- state->ad_sample += delta;
- if ( state->ad_sample > 2047 )
- state->ad_sample = 2047;
- }
-
- static int const steps [8] = {
- -1, -1, -1, -1, 2, 4, 6, 8
- };
- state->ad_ref_index += steps [c];
- if ( state->ad_ref_index < 0 )
- state->ad_ref_index = 0;
- else if ( state->ad_ref_index > 48 )
- state->ad_ref_index = 48;
-
- return state->ad_sample;
-}
-
-static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time );
-static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time )
-{
- struct State* state = &this->state;
- int volume = state->volume;
- int fadetimer = state->fadetimer;
- int fadecount = state->fadecount;
- int last_time = this->last_time;
- int next_timer = this->next_timer;
- int last_amp = this->last_amp;
-
- struct Blip_Buffer* output = this->output; // cache often-used values
-
- while ( state->playflag && last_time < end_time )
- {
- while ( last_time >= next_timer )
- {
- if ( fadetimer )
- {
- if ( fadecount > 0 )
- {
- fadecount--;
- volume = 0xFF * fadecount / fadetimer;
- }
- else if ( fadecount < 0 )
- {
- fadecount++;
- volume = 0xFF - ( 0xFF * fadecount / fadetimer );
- }
- }
- next_timer += 7159; // 7159091/1000;
- }
- int amp;
- if ( state->ad_low_nibble )
- {
- amp = Adpcm_decode( this, state->pcmbuf[ state->playptr ] & 0x0F );
- state->ad_low_nibble = false;
- state->playptr++;
- state->playedsamplecount++;
- if ( state->playedsamplecount == state->playlength )
- {
- state->playflag = 0;
- }
- }
- else
- {
- amp = Adpcm_decode( this, state->pcmbuf[ state->playptr ] >> 4 );
- state->ad_low_nibble = true;
- }
- amp = amp * volume / 0xFF;
- int delta = amp - last_amp;
- if ( output && delta )
- {
- last_amp = amp;
- Synth_offset_inline( &this->synth, last_time, delta, output );
- }
- last_time += state->freq;
- }
-
- if ( !state->playflag )
- {
- while ( next_timer <= end_time ) next_timer += 7159; // 7159091/1000
- last_time = end_time;
- }
-
- this->last_time = last_time;
- this->next_timer = next_timer;
- this->last_amp = last_amp;
- state->volume = volume;
- state->fadetimer = fadetimer;
- state->fadecount = fadecount;
-}
-
-void Adpcm_write_data( struct Hes_Apu_Adpcm* this, blip_time_t time, int addr, int data )
-{
- if ( time > this->last_time ) Adpcm_run_until( this, time );
- struct State* state = &this->state;
-
- data &= 0xFF;
- state->port[ addr & 15 ] = data;
- switch ( addr & 15 )
- {
- case 8:
- state->addr &= 0xFF00;
- state->addr |= data;
- break;
- case 9:
- state->addr &= 0xFF;
- state->addr |= data << 8;
- break;
- case 10:
- state->pcmbuf[ state->writeptr++ ] = data;
- state->playlength ++;
- break;
- case 11:
- dprintf("ADPCM DMA 0x%02X", data);
- break;
- case 13:
- if ( data & 0x80 )
- {
- state->addr = 0;
- state->freq = 0;
- state->writeptr = 0;
- state->readptr = 0;
- state->playflag = 0;
- state->repeatflag = 0;
- state->length = 0;
- state->volume = 0xFF;
- }
- if ( ( data & 3 ) == 3 )
- {
- state->writeptr = state->addr;
- }
- if ( data & 8 )
- {
- state->readptr = state->addr ? state->addr - 1 : state->addr;
- }
- if ( data & 0x10 )
- {
- state->length = state->addr;
- }
- state->repeatflag = data & 0x20;
- state->playflag = data & 0x40;
- if ( state->playflag )
- {
- state->playptr = state->readptr;
- state->playlength = state->length + 1;
- state->playedsamplecount = 0;
- state->ad_sample = 0;
- state->ad_low_nibble = false;
- }
- break;
- case 14:
- state->freq = 7159091 / ( 32000 / ( 16 - ( data & 15 ) ) );
- break;
- case 15:
- switch ( data & 15 )
- {
- case 0:
- case 8:
- case 12:
- state->fadetimer = -100;
- state->fadecount = state->fadetimer;
- break;
- case 10:
- state->fadetimer = 5000;
- state->fadecount = state->fadetimer;
- break;
- case 14:
- state->fadetimer = 1500;
- state->fadecount = state->fadetimer;
- break;
- }
- break;
- }
-}
-
-int Adpcm_read_data( struct Hes_Apu_Adpcm* this, blip_time_t time, int addr )
-{
- if ( time > this->last_time ) Adpcm_run_until( this, time );
-
- struct State* state = &this->state;
- switch ( addr & 15 )
- {
- case 10:
- return state->pcmbuf [state->readptr++];
- case 11:
- return state->port [11] & ~1;
- case 12:
- if (!state->playflag)
- {
- state->port [12] |= 1;
- state->port [12] &= ~8;
- }
- else
- {
- state->port [12] &= ~1;
- state->port [12] |= 8;
- }
- return state->port [12];
- case 13:
- return state->port [13];
- }
-
- return 0xFF;
-}
-
-void Adpcm_end_frame( struct Hes_Apu_Adpcm* this, blip_time_t end_time )
-{
- Adpcm_run_until( this, end_time );
- this->last_time -= end_time;
- this->next_timer -= end_time;
- check( last_time >= 0 );
- if ( this->output )
- Blip_set_modified( this->output );
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +#include "hes_apu_adpcm.h" + +/* Copyright (C) 2006-2008 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + + +void Adpcm_init( struct Hes_Apu_Adpcm* this ) +{ + this->output = NULL; + memset( &this->state, 0, sizeof( this->state ) ); + Adpcm_reset( this ); +} + +void Adpcm_reset( struct Hes_Apu_Adpcm* this ) +{ + this->last_time = 0; + this->next_timer = 0; + this->last_amp = 0; + + memset( &this->state.pcmbuf, 0, sizeof(this->state.pcmbuf) ); + memset( &this->state.port, 0, sizeof(this->state.port) ); + + this->state.ad_sample = 0; + this->state.ad_ref_index = 0; + + this->state.addr = 0; + this->state.freq = 0; + this->state.writeptr = 0; + this->state.readptr = 0; + this->state.playflag = 0; + this->state.repeatflag = 0; + this->state.length = 0; + this->state.volume = 0xFF; + this->state.fadetimer = 0; + this->state.fadecount = 0; +} + +static short stepsize[49] = { + 16, 17, 19, 21, 23, 25, 28, + 31, 34, 37, 41, 45, 50, 55, + 60, 66, 73, 80, 88, 97, 107, + 118, 130, 143, 157, 173, 190, 209, + 230, 253, 279, 307, 337, 371, 408, + 449, 494, 544, 598, 658, 724, 796, + 876, 963,1060,1166,1282,1411,1552 +}; + +static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code ); +static int Adpcm_decode( struct Hes_Apu_Adpcm* this,int code ) +{ + struct State* state = &this->state; + int step = stepsize[state->ad_ref_index]; + int delta; + int c = code & 7; +#if 1 + delta = 0; + if ( c & 4 ) delta += step; + step >>= 1; + if ( c & 2 ) delta += step; + step >>= 1; + if ( c & 1 ) delta += step; + step >>= 1; + delta += step; +#else + delta = ( ( c + c + 1 ) * step ) / 8; // maybe faster, but introduces rounding +#endif + if ( c != code ) + { + state->ad_sample -= delta; + if ( state->ad_sample < -2048 ) + state->ad_sample = -2048; + } + else + { + state->ad_sample += delta; + if ( state->ad_sample > 2047 ) + state->ad_sample = 2047; + } + + static int const steps [8] = { + -1, -1, -1, -1, 2, 4, 6, 8 + }; + state->ad_ref_index += steps [c]; + if ( state->ad_ref_index < 0 ) + state->ad_ref_index = 0; + else if ( state->ad_ref_index > 48 ) + state->ad_ref_index = 48; + + return state->ad_sample; +} + +static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time ); +static void Adpcm_run_until( struct Hes_Apu_Adpcm* this, blip_time_t end_time ) +{ + struct State* state = &this->state; + int volume = state->volume; + int fadetimer = state->fadetimer; + int fadecount = state->fadecount; + int last_time = this->last_time; + int next_timer = this->next_timer; + int last_amp = this->last_amp; + + struct Blip_Buffer* output = this->output; // cache often-used values + + while ( state->playflag && last_time < end_time ) + { + while ( last_time >= next_timer ) + { + if ( fadetimer ) + { + if ( fadecount > 0 ) + { + fadecount--; + volume = 0xFF * fadecount / fadetimer; + } + else if ( fadecount < 0 ) + { + fadecount++; + volume = 0xFF - ( 0xFF * fadecount / fadetimer ); + } + } + next_timer += 7159; // 7159091/1000; + } + int amp; + if ( state->ad_low_nibble ) + { + amp = Adpcm_decode( this, state->pcmbuf[ state->playptr ] & 0x0F ); + state->ad_low_nibble = false; + state->playptr++; + state->playedsamplecount++; + if ( state->playedsamplecount == state->playlength ) + { + state->playflag = 0; + } + } + else + { + amp = Adpcm_decode( this, state->pcmbuf[ state->playptr ] >> 4 ); + state->ad_low_nibble = true; + } + amp = amp * volume / 0xFF; + int delta = amp - last_amp; + if ( output && delta ) + { + last_amp = amp; + Synth_offset_inline( &this->synth, last_time, delta, output ); + } + last_time += state->freq; + } + + if ( !state->playflag ) + { + while ( next_timer <= end_time ) next_timer += 7159; // 7159091/1000 + last_time = end_time; + } + + this->last_time = last_time; + this->next_timer = next_timer; + this->last_amp = last_amp; + state->volume = volume; + state->fadetimer = fadetimer; + state->fadecount = fadecount; +} + +void Adpcm_write_data( struct Hes_Apu_Adpcm* this, blip_time_t time, int addr, int data ) +{ + if ( time > this->last_time ) Adpcm_run_until( this, time ); + struct State* state = &this->state; + + data &= 0xFF; + state->port[ addr & 15 ] = data; + switch ( addr & 15 ) + { + case 8: + state->addr &= 0xFF00; + state->addr |= data; + break; + case 9: + state->addr &= 0xFF; + state->addr |= data << 8; + break; + case 10: + state->pcmbuf[ state->writeptr++ ] = data; + state->playlength ++; + break; + case 11: + dprintf("ADPCM DMA 0x%02X", data); + break; + case 13: + if ( data & 0x80 ) + { + state->addr = 0; + state->freq = 0; + state->writeptr = 0; + state->readptr = 0; + state->playflag = 0; + state->repeatflag = 0; + state->length = 0; + state->volume = 0xFF; + } + if ( ( data & 3 ) == 3 ) + { + state->writeptr = state->addr; + } + if ( data & 8 ) + { + state->readptr = state->addr ? state->addr - 1 : state->addr; + } + if ( data & 0x10 ) + { + state->length = state->addr; + } + state->repeatflag = data & 0x20; + state->playflag = data & 0x40; + if ( state->playflag ) + { + state->playptr = state->readptr; + state->playlength = state->length + 1; + state->playedsamplecount = 0; + state->ad_sample = 0; + state->ad_low_nibble = false; + } + break; + case 14: + state->freq = 7159091 / ( 32000 / ( 16 - ( data & 15 ) ) ); + break; + case 15: + switch ( data & 15 ) + { + case 0: + case 8: + case 12: + state->fadetimer = -100; + state->fadecount = state->fadetimer; + break; + case 10: + state->fadetimer = 5000; + state->fadecount = state->fadetimer; + break; + case 14: + state->fadetimer = 1500; + state->fadecount = state->fadetimer; + break; + } + break; + } +} + +int Adpcm_read_data( struct Hes_Apu_Adpcm* this, blip_time_t time, int addr ) +{ + if ( time > this->last_time ) Adpcm_run_until( this, time ); + + struct State* state = &this->state; + switch ( addr & 15 ) + { + case 10: + return state->pcmbuf [state->readptr++]; + case 11: + return state->port [11] & ~1; + case 12: + if (!state->playflag) + { + state->port [12] |= 1; + state->port [12] &= ~8; + } + else + { + state->port [12] &= ~1; + state->port [12] |= 8; + } + return state->port [12]; + case 13: + return state->port [13]; + } + + return 0xFF; +} + +void Adpcm_end_frame( struct Hes_Apu_Adpcm* this, blip_time_t end_time ) +{ + Adpcm_run_until( this, end_time ); + this->last_time -= end_time; + this->next_timer -= end_time; + check( last_time >= 0 ); + if ( this->output ) + Blip_set_modified( this->output ); +} diff --git a/apps/codecs/libgme/inflate/mbreader.c b/apps/codecs/libgme/inflate/mbreader.c index 96e45cd..8257879 100644 --- a/apps/codecs/libgme/inflate/mbreader.c +++ b/apps/codecs/libgme/inflate/mbreader.c @@ -1,16 +1,16 @@ -
-/* Memory buffer reader, simulates file read
- @ gama
-*/
-
-#include "mbreader.h"
-
-int mbread(struct mbreader_t *md, void *buf, size_t n)
-{
- if (!md) return -1;
- size_t read_bytes = (md->offset+n) > md->size ?
- md->size-md->offset : n;
- memcpy(buf,md->ptr + md->offset,read_bytes);
- md->offset += read_bytes;
- return read_bytes;
-}
+ +/* Memory buffer reader, simulates file read + @ gama +*/ + +#include "mbreader.h" + +int mbread(struct mbreader_t *md, void *buf, size_t n) +{ + if (!md) return -1; + size_t read_bytes = (md->offset+n) > md->size ? + md->size-md->offset : n; + memcpy(buf,md->ptr + md->offset,read_bytes); + md->offset += read_bytes; + return read_bytes; +} diff --git a/apps/codecs/libgme/inflate/mbreader.h b/apps/codecs/libgme/inflate/mbreader.h index 6427f18..d345c0c 100644 --- a/apps/codecs/libgme/inflate/mbreader.h +++ b/apps/codecs/libgme/inflate/mbreader.h @@ -1,15 +1,15 @@ -
-#ifndef MBREADER_H
-#define MBREADER_H
-
-#include "codeclib.h"
-
-struct mbreader_t {
- const char *ptr;
- size_t size;
- size_t offset;
-};
-
-int mbread(struct mbreader_t *md, void *buf, size_t n);
-
-#endif
+ +#ifndef MBREADER_H +#define MBREADER_H + +#include "codeclib.h" + +struct mbreader_t { + const char *ptr; + size_t size; + size_t offset; +}; + +int mbread(struct mbreader_t *md, void *buf, size_t n); + +#endif diff --git a/apps/codecs/libgme/kss_cpu.c b/apps/codecs/libgme/kss_cpu.c index 891a7df..20601e6 100644 --- a/apps/codecs/libgme/kss_cpu.c +++ b/apps/codecs/libgme/kss_cpu.c @@ -1,35 +1,35 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-#include "kss_emu.h"
-
-#include "blargg_endian.h"
-//#include "z80_cpu_log.h"
-
-/* Copyright (C) 2006-2008 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#include "blargg_source.h"
-
-#define OUT_PORT( addr, data ) cpu_out( this, TIME(), addr, data )
-#define IN_PORT( addr ) cpu_in( this, TIME(), addr )
-#define WRITE_MEM( addr, data ) {FLUSH_TIME(); cpu_write( this, addr, data );}
-#define IDLE_ADDR idle_addr
-
-#define CPU_BEGIN \
-bool run_cpu( struct Kss_Emu* this, kss_time_t end_time )\
-{\
- struct Z80_Cpu *cpu = &this->cpu; \
- Z80_set_end_time( cpu, end_time );
-
- #include "z80_cpu_run.h"
-
- return warning;
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +#include "kss_emu.h" + +#include "blargg_endian.h" +//#include "z80_cpu_log.h" + +/* Copyright (C) 2006-2008 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "blargg_source.h" + +#define OUT_PORT( addr, data ) cpu_out( this, TIME(), addr, data ) +#define IN_PORT( addr ) cpu_in( this, TIME(), addr ) +#define WRITE_MEM( addr, data ) {FLUSH_TIME(); cpu_write( this, addr, data );} +#define IDLE_ADDR idle_addr + +#define CPU_BEGIN \ +bool run_cpu( struct Kss_Emu* this, kss_time_t end_time )\ +{\ + struct Z80_Cpu *cpu = &this->cpu; \ + Z80_set_end_time( cpu, end_time ); + + #include "z80_cpu_run.h" + + return warning; +} diff --git a/apps/codecs/libgme/nes_cpu_run.h b/apps/codecs/libgme/nes_cpu_run.h index 5b964d5..fd1fea9 100644 --- a/apps/codecs/libgme/nes_cpu_run.h +++ b/apps/codecs/libgme/nes_cpu_run.h @@ -1,1122 +1,1122 @@ -// NES 6502 cpu emulator run function
-
-#if 0
-/* Define these macros in the source file before #including this file.
-- Parameters might be expressions, so they are best evaluated only once,
-though they NEVER have side-effects, so multiple evaluation is OK.
-- Output parameters might be a multiple-assignment expression like "a=x",
-so they must NOT be parenthesized.
-- Except where noted, time() and related functions will NOT work
-correctly inside a macro. TIME() is always correct, and FLUSH_TIME() and
-CACHE_TIME() allow the time changing functions to work.
-- Macros "returning" void may use a {} statement block. */
-
- // 0 <= addr <= 0xFFFF + page_size
- // time functions can be used
- int READ_MEM( addr_t );
- void WRITE_MEM( addr_t, int data );
- // 0 <= READ_MEM() <= 0xFF
-
- // 0 <= addr <= 0x1FF
- int READ_LOW( addr_t );
- void WRITE_LOW( addr_t, int data );
- // 0 <= READ_LOW() <= 0xFF
-
- // Often-used instructions attempt these before using a normal memory access.
- // Optional; defaults to READ_MEM() and WRITE_MEM()
- bool CAN_READ_FAST( addr_t ); // if true, uses result of READ_FAST
- void READ_FAST( addr_t, int& out ); // ALWAYS called BEFORE CAN_READ_FAST
- bool CAN_WRITE_FAST( addr_t ); // if true, uses WRITE_FAST instead of WRITE_MEM
- void WRITE_FAST( addr_t, int data );
-
- // Used by instructions most often used to access the NES PPU (LDA abs and BIT abs).
- // Optional; defaults to READ_MEM.
- void READ_PPU( addr_t, int& out );
- // 0 <= out <= 0xFF
-
-// The following can be used within macros:
-
- // Current time
- time_t TIME();
-
- // Allows use of time functions
- void FLUSH_TIME();
-
- // Must be used before end of macro if FLUSH_TIME() was used earlier
- void CACHE_TIME();
-
-// Configuration (optional; commented behavior if defined)
-
- // Emulates dummy reads for indexed instructions
- #define NES_CPU_DUMMY_READS 1
-
- // Optimizes as if map_code( 0, 0x10000 + cpu_padding, FLAT_MEM ) is always in effect
- #define FLAT_MEM my_mem_array
-
- // Expanded just before beginning of code, to help debugger
- #define CPU_BEGIN void my_run_cpu() {
-
-#endif
-
-/* Copyright (C) 2003-2008 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-// Allows MWCW debugger to step through code properly
-#ifdef CPU_BEGIN
- CPU_BEGIN
-#endif
-
-// Time
-#define TIME() (s_time + s.base)
-#define FLUSH_TIME() {s.time = s_time - time_offset;}
-#define CACHE_TIME() {s_time = s.time + time_offset;}
-
-// Defaults
-#ifndef CAN_WRITE_FAST
- #define CAN_WRITE_FAST( addr ) 0
- #define WRITE_FAST( addr, data )
-#endif
-
-#ifndef CAN_READ_FAST
- #define CAN_READ_FAST( addr ) 0
- #define READ_FAST( addr, out )
-#endif
-
-#ifndef READ_PPU
- #define READ_PPU( addr, out )\
- {\
- FLUSH_TIME();\
- out = READ_MEM( addr );\
- CACHE_TIME();\
- }
-#endif
-
-#define READ_STACK READ_LOW
-#define WRITE_STACK WRITE_LOW
-
-// Dummy reads
-#ifdef NES_CPU_DUMMY_READS
- // TODO: optimize time handling
- #define DUMMY_READ( addr, idx ) \
- if ( (addr & 0xFF) < idx )\
- {\
- int const time_offset = 1;\
- FLUSH_TIME();\
- READ_MEM( (addr - 0x100) );\
- CACHE_TIME();\
- }
-#else
- #define DUMMY_READ( addr, idx )
-#endif
-
-// Code
-#ifdef FLAT_MEM
- #define CODE_PAGE( addr ) (FLAT_MEM)
- #define CODE_OFFSET( addr ) (addr)
-#else
- #define CODE_PAGE( addr ) (s.code_map [NES_CPU_PAGE( addr )])
- #define CODE_OFFSET( addr ) NES_CPU_OFFSET( addr )
-#endif
-#define READ_CODE( addr ) (CODE_PAGE( addr ) [CODE_OFFSET( addr )])
-
-// Stack
-#define SET_SP( v ) (sp = ((v) + 1) | 0x100)
-#define GET_SP() ((sp - 1) & 0xFF)
-#define SP( o ) ((sp + (o - (o>0)*0x100)) | 0x100)
-
-// Truncation
-#define BYTE( n ) ((uint8_t ) (n)) /* (unsigned) n & 0xFF */
-#define SBYTE( n ) ((int8_t ) (n)) /* (BYTE( n ) ^ 0x80) - 0x80 */
-#define WORD( n ) ((uint16_t) (n)) /* (unsigned) n & 0xFFFF */
-
-// Flags with hex value for clarity when used as mask.
-// Stored in indicated variable during emulation.
-int const n80 = 0x80; // nz
-int const v40 = 0x40; // flags
-int const r20 = 0x20;
-int const b10 = 0x10;
-int const d08 = 0x08; // flags
-int const i04 = 0x04; // flags
-int const z02 = 0x02; // nz
-int const c01 = 0x01; // c
-
-#define IS_NEG (nz & 0x8080)
-
-#define GET_FLAGS( out ) \
-{\
- out = flags & (v40 | d08 | i04);\
- out += ((nz >> 8) | nz) & n80;\
- out += c >> 8 & c01;\
- if ( !BYTE( nz ) )\
- out += z02;\
-}
-
-#define SET_FLAGS( in ) \
-{\
- flags = in & (v40 | d08 | i04);\
- c = nz = in << 8;\
- nz += ~in & z02;\
-}
-
-{
- int const time_offset = 0;
-
- // Local state
- struct cpu_state_t s;
- #ifdef FLAT_MEM
- s.base = cpu->cpu_state_.base;
- #else
- s = cpu->cpu_state_;
- #endif
- cpu->cpu_state = &s;
- int s_time = cpu->cpu_state_.time; // helps even on x86
-
- // Registers
- int pc = cpu->r.pc;
- int a = cpu->r.a;
- int x = cpu->r.x;
- int y = cpu->r.y;
- int sp;
- SET_SP( cpu->r.sp );
-
- // Flags
- int flags;
- int c; // carry set if (c & 0x100) != 0
- int nz; // Z set if (nz & 0xFF) == 0, N set if (nz & 0x8080) != 0
- {
- int temp = cpu->r.flags;
- SET_FLAGS( temp );
- }
-
-loop:
-
- // Check all values
- check( (unsigned) sp - 0x100 < 0x100 );
- check( (unsigned) pc < 0x10000 );
- check( (unsigned) a < 0x100 );
- check( (unsigned) x < 0x100 );
- check( (unsigned) y < 0x100 );
-
- // Read instruction
- byte const* instr = CODE_PAGE( pc );
- int opcode;
-
- if ( CODE_OFFSET(~0) == ~0 )
- {
- opcode = instr [pc];
- pc++;
- instr += pc;
- }
- else
- {
- instr += CODE_OFFSET( pc );
- opcode = *instr++;
- pc++;
- }
-
- // local to function in case it helps optimizer
- static byte const clock_table [256] =
- {// 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 0,6,2,8,3,3,5,5,3,2,2,2,4,4,6,6,// 0
- 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 1
- 6,6,0,8,3,3,5,5,4,2,2,2,4,4,6,6,// 2
- 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 3
- 6,6,2,8,3,3,5,5,3,2,2,2,3,4,6,6,// 4
- 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 5
- 6,6,2,8,3,3,5,5,4,2,2,2,5,4,6,6,// 6
- 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 7
- 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// 8
- 2,6,2,6,4,4,4,4,2,5,2,5,5,5,5,5,// 9
- 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// A
- 2,5,2,5,4,4,4,4,2,4,2,4,4,4,4,4,// B
- 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// C
- 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// D
- 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// E
- 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F
- }; // 0x00 was 7 and 0x22 was 2
-
- // Update time
- if ( s_time >= 0 )
- goto out_of_time;
-
- #ifdef CPU_INSTR_HOOK
- { CPU_INSTR_HOOK( (pc-1), (&instr [-1]), a, x, y, GET_SP(), TIME() ); }
- #endif
-
- s_time += clock_table [opcode];
-
- int data;
- data = *instr;
-
- switch ( opcode )
- {
-
-// Macros
-
-#define GET_MSB() (instr [1])
-#define ADD_PAGE( out ) (pc++, out = data + 0x100 * GET_MSB())
-#define GET_ADDR() GET_LE16( instr )
-
-#define PAGE_PENALTY( lsb ) s_time += (lsb) >> 8;
-
-#define INC_DEC( reg, n ) reg = BYTE( nz = reg + n ); goto loop;
-
-#define IND_Y( cross, out ) {\
- int temp = READ_LOW( data ) + y;\
- out = temp + 0x100 * READ_LOW( BYTE( data + 1 ) );\
- cross( temp );\
- }
-
-#define IND_X( out ) {\
- int temp = data + x;\
- out = 0x100 * READ_LOW( BYTE( temp + 1 ) ) + READ_LOW( BYTE( temp ) );\
- }
-
-#define ARITH_ADDR_MODES( op )\
-case op - 0x04: /* (ind,x) */\
- IND_X( data )\
- goto ptr##op;\
-case op + 0x0C: /* (ind),y */\
- IND_Y( PAGE_PENALTY, data )\
- goto ptr##op;\
-case op + 0x10: /* zp,X */\
- data = BYTE( data + x );\
-case op + 0x00: /* zp */\
- data = READ_LOW( data );\
- goto imm##op;\
-case op + 0x14: /* abs,Y */\
- data += y;\
- goto ind##op;\
-case op + 0x18: /* abs,X */\
- data += x;\
-ind##op:\
- PAGE_PENALTY( data );\
-case op + 0x08: /* abs */\
- ADD_PAGE( data );\
-ptr##op:\
- FLUSH_TIME();\
- data = READ_MEM( data );\
- CACHE_TIME();\
-case op + 0x04: /* imm */\
-imm##op:
-
-// TODO: more efficient way to handle negative branch that wraps PC around
-#define BRANCH( cond )\
-{\
- ++pc;\
- if ( !(cond) ) goto loop;\
- s_time++;\
- int offset = SBYTE( data );\
- s_time += (BYTE(pc) + offset) >> 8 & 1;\
- pc = WORD( pc + offset );\
- goto loop;\
-}
-
-// Often-Used
-
- case 0xB5: // LDA zp,x
- a = nz = READ_LOW( BYTE( data + x ) );
- pc++;
- goto loop;
-
- case 0xA5: // LDA zp
- a = nz = READ_LOW( data );
- pc++;
- goto loop;
-
- case 0xD0: // BNE
- BRANCH( BYTE( nz ) );
-
- case 0x20: { // JSR
- int temp = pc + 1;
- pc = GET_ADDR();
- WRITE_STACK( SP( -1 ), temp >> 8 );
- sp = SP( -2 );
- WRITE_STACK( sp, temp );
- goto loop;
- }
-
- case 0x4C: // JMP abs
- pc = GET_ADDR();
- goto loop;
-
- case 0xE8: // INX
- INC_DEC( x, 1 )
-
- case 0x10: // BPL
- BRANCH( !IS_NEG )
-
- ARITH_ADDR_MODES( 0xC5 ) // CMP
- nz = a - data;
- pc++;
- c = ~nz;
- nz &= 0xFF;
- goto loop;
-
- case 0x30: // BMI
- BRANCH( IS_NEG )
-
- case 0xF0: // BEQ
- BRANCH( !BYTE( nz ) );
-
- case 0x95: // STA zp,x
- data = BYTE( data + x );
- case 0x85: // STA zp
- pc++;
- WRITE_LOW( data, a );
- goto loop;
-
- case 0xC8: // INY
- INC_DEC( y, 1 )
-
- case 0xA8: // TAY
- y = a;
- nz = a;
- goto loop;
-
- case 0x98: // TYA
- a = y;
- nz = y;
- goto loop;
-
- case 0xAD:{// LDA abs
- int addr = GET_ADDR();
- pc += 2;
- READ_PPU( addr, a = nz );
- goto loop;
- }
-
- case 0x60: // RTS
- pc = 1 + READ_STACK( sp );
- pc += 0x100 * READ_STACK( SP( 1 ) );
- sp = SP( 2 );
- goto loop;
-
- {
- int addr;
-
- case 0x8D: // STA abs
- addr = GET_ADDR();
- pc += 2;
- if ( CAN_WRITE_FAST( addr ) )
- {
- WRITE_FAST( addr, a );
- goto loop;
- }
- sta_ptr:
- FLUSH_TIME();
- WRITE_MEM( addr, a );
- CACHE_TIME();
- goto loop;
-
- case 0x99: // STA abs,Y
- addr = y + GET_ADDR();
- pc += 2;
- if ( CAN_WRITE_FAST( addr ) )
- {
- WRITE_FAST( addr, a );
- goto loop;
- }
- goto sta_abs_x;
-
- case 0x9D: // STA abs,X (slightly more common than STA abs)
- addr = x + GET_ADDR();
- pc += 2;
- if ( CAN_WRITE_FAST( addr ) )
- {
- WRITE_FAST( addr, a );
- goto loop;
- }
- DUMMY_READ( addr, x );
- sta_abs_x:
- FLUSH_TIME();
- WRITE_MEM( addr, a );
- CACHE_TIME();
- goto loop;
-
- case 0x91: // STA (ind),Y
- #define NO_PAGE_PENALTY( lsb )
- IND_Y( NO_PAGE_PENALTY, addr )
- pc++;
- DUMMY_READ( addr, y );
- goto sta_ptr;
-
- case 0x81: // STA (ind,X)
- IND_X( addr )
- pc++;
- goto sta_ptr;
-
- }
-
- case 0xA9: // LDA #imm
- pc++;
- a = data;
- nz = data;
- goto loop;
-
- // common read instructions
- {
- int addr;
-
- case 0xA1: // LDA (ind,X)
- IND_X( addr )
- pc++;
- goto a_nz_read_addr;
-
- case 0xB1:// LDA (ind),Y
- addr = READ_LOW( data ) + y;
- PAGE_PENALTY( addr );
- addr += 0x100 * READ_LOW( BYTE( data + 1 ) );
- pc++;
- READ_FAST( addr, a = nz );
- if ( CAN_READ_FAST( addr ) )
- goto loop;
- DUMMY_READ( addr, y );
- goto a_nz_read_addr;
-
- case 0xB9: // LDA abs,Y
- PAGE_PENALTY( data + y );
- addr = GET_ADDR() + y;
- pc += 2;
- READ_FAST( addr, a = nz );
- if ( CAN_READ_FAST( addr ) )
- goto loop;
- goto a_nz_read_addr;
-
- case 0xBD: // LDA abs,X
- PAGE_PENALTY( data + x );
- addr = GET_ADDR() + x;
- pc += 2;
- READ_FAST( addr, a = nz );
- if ( CAN_READ_FAST( addr ) )
- goto loop;
- DUMMY_READ( addr, x );
- a_nz_read_addr:
- FLUSH_TIME();
- a = nz = READ_MEM( addr );
- CACHE_TIME();
- goto loop;
-
- }
-
-// Branch
-
- case 0x50: // BVC
- BRANCH( !(flags & v40) )
-
- case 0x70: // BVS
- BRANCH( flags & v40 )
-
- case 0xB0: // BCS
- BRANCH( c & 0x100 )
-
- case 0x90: // BCC
- BRANCH( !(c & 0x100) )
-
-// Load/store
-
- case 0x94: // STY zp,x
- data = BYTE( data + x );
- case 0x84: // STY zp
- pc++;
- WRITE_LOW( data, y );
- goto loop;
-
- case 0x96: // STX zp,y
- data = BYTE( data + y );
- case 0x86: // STX zp
- pc++;
- WRITE_LOW( data, x );
- goto loop;
-
- case 0xB6: // LDX zp,y
- data = BYTE( data + y );
- case 0xA6: // LDX zp
- data = READ_LOW( data );
- case 0xA2: // LDX #imm
- pc++;
- x = data;
- nz = data;
- goto loop;
-
- case 0xB4: // LDY zp,x
- data = BYTE( data + x );
- case 0xA4: // LDY zp
- data = READ_LOW( data );
- case 0xA0: // LDY #imm
- pc++;
- y = data;
- nz = data;
- goto loop;
-
- case 0xBC: // LDY abs,X
- data += x;
- PAGE_PENALTY( data );
- case 0xAC:{// LDY abs
- int addr = data + 0x100 * GET_MSB();
- pc += 2;
- FLUSH_TIME();
- y = nz = READ_MEM( addr );
- CACHE_TIME();
- goto loop;
- }
-
- case 0xBE: // LDX abs,y
- data += y;
- PAGE_PENALTY( data );
- case 0xAE:{// LDX abs
- int addr = data + 0x100 * GET_MSB();
- pc += 2;
- FLUSH_TIME();
- x = nz = READ_MEM( addr );
- CACHE_TIME();
- goto loop;
- }
-
- {
- int temp;
- case 0x8C: // STY abs
- temp = y;
- goto store_abs;
-
- case 0x8E: // STX abs
- temp = x;
- store_abs:
- {
- int addr = GET_ADDR();
- pc += 2;
- if ( CAN_WRITE_FAST( addr ) )
- {
- WRITE_FAST( addr, temp );
- goto loop;
- }
- FLUSH_TIME();
- WRITE_MEM( addr, temp );
- CACHE_TIME();
- goto loop;
- }
- }
-
-// Compare
-
- case 0xEC: {// CPX abs
- int addr = GET_ADDR();
- pc++;
- FLUSH_TIME();
- data = READ_MEM( addr );
- CACHE_TIME();
- goto cpx_data;
- }
-
- case 0xE4: // CPX zp
- data = READ_LOW( data );
- case 0xE0: // CPX #imm
- cpx_data:
- nz = x - data;
- pc++;
- c = ~nz;
- nz &= 0xFF;
- goto loop;
-
- case 0xCC:{// CPY abs
- int addr = GET_ADDR();
- pc++;
- FLUSH_TIME();
- data = READ_MEM( addr );
- CACHE_TIME();
- goto cpy_data;
- }
-
- case 0xC4: // CPY zp
- data = READ_LOW( data );
- case 0xC0: // CPY #imm
- cpy_data:
- nz = y - data;
- pc++;
- c = ~nz;
- nz &= 0xFF;
- goto loop;
-
-// Logical
-
- ARITH_ADDR_MODES( 0x25 ) // AND
- nz = (a &= data);
- pc++;
- goto loop;
-
- ARITH_ADDR_MODES( 0x45 ) // EOR
- nz = (a ^= data);
- pc++;
- goto loop;
-
- ARITH_ADDR_MODES( 0x05 ) // ORA
- nz = (a |= data);
- pc++;
- goto loop;
-
- case 0x2C:{// BIT abs
- int addr = GET_ADDR();
- pc += 2;
- READ_PPU( addr, nz );
- flags = (flags & ~v40) + (nz & v40);
- if ( a & nz )
- goto loop;
- nz <<= 8; // result must be zero, even if N bit is set
- goto loop;
- }
-
- case 0x24: // BIT zp
- nz = READ_LOW( data );
- pc++;
- flags = (flags & ~v40) + (nz & v40);
- if ( a & nz )
- goto loop; // Z should be clear, and nz must be non-zero if nz & a is
- nz <<= 8; // set Z flag without affecting N flag
- goto loop;
-
-// Add/subtract
-
- ARITH_ADDR_MODES( 0xE5 ) // SBC
- case 0xEB: // unofficial equivalent
- data ^= 0xFF;
- goto adc_imm;
-
- ARITH_ADDR_MODES( 0x65 ) // ADC
- adc_imm: {
- int carry = c >> 8 & 1;
- int ov = (a ^ 0x80) + carry + SBYTE( data );
- flags = (flags & ~v40) + (ov >> 2 & v40);
- c = nz = a + data + carry;
- pc++;
- a = BYTE( nz );
- goto loop;
- }
-
-// Shift/rotate
-
- case 0x4A: // LSR A
- c = 0;
- case 0x6A: // ROR A
- nz = c >> 1 & 0x80;
- c = a << 8;
- nz += a >> 1;
- a = nz;
- goto loop;
-
- case 0x0A: // ASL A
- nz = a << 1;
- c = nz;
- a = BYTE( nz );
- goto loop;
-
- case 0x2A: { // ROL A
- nz = a << 1;
- int temp = c >> 8 & 1;
- c = nz;
- nz += temp;
- a = BYTE( nz );
- goto loop;
- }
-
- case 0x5E: // LSR abs,X
- data += x;
- case 0x4E: // LSR abs
- c = 0;
- case 0x6E: // ROR abs
- ror_abs: {
- ADD_PAGE( data );
- FLUSH_TIME();
- int temp = READ_MEM( data );
- nz = (c >> 1 & 0x80) + (temp >> 1);
- c = temp << 8;
- goto rotate_common;
- }
-
- case 0x3E: // ROL abs,X
- data += x;
- goto rol_abs;
-
- case 0x1E: // ASL abs,X
- data += x;
- case 0x0E: // ASL abs
- c = 0;
- case 0x2E: // ROL abs
- rol_abs:
- ADD_PAGE( data );
- nz = c >> 8 & 1;
- FLUSH_TIME();
- nz += (c = READ_MEM( data ) << 1);
- rotate_common:
- pc++;
- WRITE_MEM( data, BYTE( nz ) );
- CACHE_TIME();
- goto loop;
-
- case 0x7E: // ROR abs,X
- data += x;
- goto ror_abs;
-
- case 0x76: // ROR zp,x
- data = BYTE( data + x );
- goto ror_zp;
-
- case 0x56: // LSR zp,x
- data = BYTE( data + x );
- case 0x46: // LSR zp
- c = 0;
- case 0x66: // ROR zp
- ror_zp: {
- int temp = READ_LOW( data );
- nz = (c >> 1 & 0x80) + (temp >> 1);
- c = temp << 8;
- goto write_nz_zp;
- }
-
- case 0x36: // ROL zp,x
- data = BYTE( data + x );
- goto rol_zp;
-
- case 0x16: // ASL zp,x
- data = BYTE( data + x );
- case 0x06: // ASL zp
- c = 0;
- case 0x26: // ROL zp
- rol_zp:
- nz = c >> 8 & 1;
- nz += (c = READ_LOW( data ) << 1);
- goto write_nz_zp;
-
-// Increment/decrement
-
- case 0xCA: // DEX
- INC_DEC( x, -1 )
-
- case 0x88: // DEY
- INC_DEC( y, -1 )
-
- case 0xF6: // INC zp,x
- data = BYTE( data + x );
- case 0xE6: // INC zp
- nz = 1;
- goto add_nz_zp;
-
- case 0xD6: // DEC zp,x
- data = BYTE( data + x );
- case 0xC6: // DEC zp
- nz = -1;
- add_nz_zp:
- nz += READ_LOW( data );
- write_nz_zp:
- pc++;
- WRITE_LOW( data, nz );
- goto loop;
-
- case 0xFE: // INC abs,x
- data = x + GET_ADDR();
- goto inc_ptr;
-
- case 0xEE: // INC abs
- data = GET_ADDR();
- inc_ptr:
- nz = 1;
- goto inc_common;
-
- case 0xDE: // DEC abs,x
- data = x + GET_ADDR();
- goto dec_ptr;
-
- case 0xCE: // DEC abs
- data = GET_ADDR();
- dec_ptr:
- nz = -1;
- inc_common:
- FLUSH_TIME();
- pc += 2;
- nz += READ_MEM( data );
- WRITE_MEM( data, BYTE( nz ) );
- CACHE_TIME();
- goto loop;
-
-// Transfer
-
- case 0xAA: // TAX
- x = nz = a;
- goto loop;
-
- case 0x8A: // TXA
- a = nz = x;
- goto loop;
-
- case 0x9A: // TXS
- SET_SP( x ); // verified (no flag change)
- goto loop;
-
- case 0xBA: // TSX
- x = nz = GET_SP();
- goto loop;
-
-// Stack
-
- case 0x48: // PHA
- sp = SP( -1 );
- WRITE_STACK( sp, a );
- goto loop;
-
- case 0x68: // PLA
- a = nz = READ_STACK( sp );
- sp = SP( 1 );
- goto loop;
-
- case 0x40:{// RTI
- pc = READ_STACK( SP( 1 ) );
- pc += READ_STACK( SP( 2 ) ) * 0x100;
- int temp = READ_STACK( sp );
- sp = SP( 3 );
- data = flags;
- SET_FLAGS( temp );
- cpu->r.flags = flags; // update externally-visible I flag
- int delta = s.base - cpu->irq_time;
- if ( delta <= 0 ) goto loop; // end_time < irq_time
- if ( flags & i04 ) goto loop;
- s_time += delta;
- s.base = cpu->irq_time;
- goto loop;
- }
-
- case 0x28:{// PLP
- int temp = READ_STACK( sp );
- sp = SP( 1 );
- int changed = flags ^ temp;
- SET_FLAGS( temp );
- if ( !(changed & i04) )
- goto loop; // I flag didn't change
- if ( flags & i04 )
- goto handle_sei;
- goto handle_cli;
- }
-
- case 0x08:{// PHP
- int temp;
- GET_FLAGS( temp );
- sp = SP( -1 );
- WRITE_STACK( sp, temp | (b10 | r20) );
- goto loop;
- }
-
- case 0x6C:{// JMP (ind)
- data = GET_ADDR();
- byte const* page = CODE_PAGE( data );
- pc = page [CODE_OFFSET( data )];
- data = (data & 0xFF00) + ((data + 1) & 0xFF);
- pc += page [CODE_OFFSET( data )] * 0x100;
- goto loop;
- }
-
- case 0x00: // BRK
- goto handle_brk;
-
-// Flags
-
- case 0x38: // SEC
- c = 0x100;
- goto loop;
-
- case 0x18: // CLC
- c = 0;
- goto loop;
-
- case 0xB8: // CLV
- flags &= ~v40;
- goto loop;
-
- case 0xD8: // CLD
- flags &= ~d08;
- goto loop;
-
- case 0xF8: // SED
- flags |= d08;
- goto loop;
-
- case 0x58: // CLI
- if ( !(flags & i04) )
- goto loop;
- flags &= ~i04;
- handle_cli: {
- //dprintf( "CLI at %d\n", TIME );
- cpu->r.flags = flags; // update externally-visible I flag
- int delta = s.base - cpu->irq_time;
- if ( delta <= 0 )
- {
- if ( TIME() < cpu->irq_time )
- goto loop;
- goto delayed_cli;
- }
- s.base = cpu->irq_time;
- s_time += delta;
- if ( s_time < 0 )
- goto loop;
-
- if ( delta >= s_time + 1 )
- {
- // delayed irq until after next instruction
- s.base += s_time + 1;
- s_time = -1;
- goto loop;
- }
-
- // TODO: implement
- delayed_cli:
- dprintf( "Delayed CLI not emulated\n" );
- goto loop;
- }
-
- case 0x78: // SEI
- if ( flags & i04 )
- goto loop;
- flags |= i04;
- handle_sei: {
- cpu->r.flags = flags; // update externally-visible I flag
- int delta = s.base - cpu->end_time;
- s.base = cpu->end_time;
- s_time += delta;
- if ( s_time < 0 )
- goto loop;
-
- dprintf( "Delayed SEI not emulated\n" );
- goto loop;
- }
-
-// Unofficial
-
- // SKW - skip word
- case 0x1C: case 0x3C: case 0x5C: case 0x7C: case 0xDC: case 0xFC:
- PAGE_PENALTY( data + x );
- case 0x0C:
- pc++;
- // SKB - skip byte
- case 0x74: case 0x04: case 0x14: case 0x34: case 0x44: case 0x54: case 0x64:
- case 0x80: case 0x82: case 0x89: case 0xC2: case 0xD4: case 0xE2: case 0xF4:
- pc++;
- goto loop;
-
- // NOP
- case 0xEA: case 0x1A: case 0x3A: case 0x5A: case 0x7A: case 0xDA: case 0xFA:
- goto loop;
-
- case halt_opcode: // HLT - halt processor
- if ( pc-- > 0x10000 )
- {
- // handle wrap-around (assumes caller has put page of HLT at 0x10000)
- pc = WORD( pc );
- goto loop;
- }
- case 0x02: case 0x12: case 0x32: case 0x42: case 0x52:
- case 0x62: case 0x72: case 0x92: case 0xB2: case 0xD2: case 0xF2:
- goto stop;
-
-// Unimplemented
-
- case 0xFF: // force 256-entry jump table for optimization purposes
- c |= 1; // compiler doesn't know that this won't affect anything
- default:
- check( (unsigned) opcode < 0x100 );
-
- #ifdef UNIMPL_INSTR
- UNIMPL_INSTR();
- #endif
-
- // At least skip over proper number of bytes instruction uses
- static unsigned char const illop_lens [8] = {
- 0x40, 0x40, 0x40, 0x80, 0x40, 0x40, 0x80, 0xA0
- };
- int opcode = instr [-1];
- int len = illop_lens [opcode >> 2 & 7] >> (opcode << 1 & 6) & 3;
- if ( opcode == 0x9C )
- len = 2;
- pc += len;
-
- // Account for extra clock
- if ( (opcode >> 4) == 0x0B )
- {
- if ( opcode == 0xB3 )
- data = READ_LOW( data );
- if ( opcode != 0xB7 )
- PAGE_PENALTY( data + y );
- }
- goto loop;
- }
- assert( false ); // catch missing 'goto loop' or accidental 'break'
-
- int result_;
-handle_brk:
- pc++;
- result_ = b10 | 4;
-
-#ifdef CPU_DONE
-interrupt:
-#endif
- {
- s_time += 7;
-
- // Save PC and read vector
- WRITE_STACK( SP( -1 ), pc >> 8 );
- WRITE_STACK( SP( -2 ), pc );
- pc = GET_LE16( &READ_CODE( 0xFFFA ) + (result_ & 4) );
-
- // Save flags
- int temp;
- GET_FLAGS( temp );
- temp |= r20 + (result_ & b10); // B flag set for BRK
- sp = SP( -3 );
- WRITE_STACK( sp, temp );
-
- // Update I flag in externally-visible flags
- cpu->r.flags = (flags |= i04);
-
- // Update time
- int delta = s.base - cpu->end_time;
- if ( delta >= 0 )
- goto loop;
- s_time += delta;
- s.base = cpu->end_time;
- goto loop;
- }
-
-out_of_time:
- pc--;
-
- // Optional action that triggers interrupt or changes irq/end time
- #ifdef CPU_DONE
- {
- CPU_DONE( result_ );
- if ( result_ >= 0 )
- goto interrupt;
- if ( s_time < 0 )
- goto loop;
- }
- #endif
-stop:
-
- // Flush cached state
- cpu->r.pc = pc;
- cpu->r.sp = GET_SP();
- cpu->r.a = a;
- cpu->r.x = x;
- cpu->r.y = y;
-
- int temp;
- GET_FLAGS( temp );
- cpu->r.flags = temp;
-
- cpu->cpu_state_.base = s.base;
- cpu->cpu_state_.time = s_time;
- cpu->cpu_state = &cpu->cpu_state_;
-}
+// NES 6502 cpu emulator run function + +#if 0 +/* Define these macros in the source file before #including this file. +- Parameters might be expressions, so they are best evaluated only once, +though they NEVER have side-effects, so multiple evaluation is OK. +- Output parameters might be a multiple-assignment expression like "a=x", +so they must NOT be parenthesized. +- Except where noted, time() and related functions will NOT work +correctly inside a macro. TIME() is always correct, and FLUSH_TIME() and +CACHE_TIME() allow the time changing functions to work. +- Macros "returning" void may use a {} statement block. */ + + // 0 <= addr <= 0xFFFF + page_size + // time functions can be used + int READ_MEM( addr_t ); + void WRITE_MEM( addr_t, int data ); + // 0 <= READ_MEM() <= 0xFF + + // 0 <= addr <= 0x1FF + int READ_LOW( addr_t ); + void WRITE_LOW( addr_t, int data ); + // 0 <= READ_LOW() <= 0xFF + + // Often-used instructions attempt these before using a normal memory access. + // Optional; defaults to READ_MEM() and WRITE_MEM() + bool CAN_READ_FAST( addr_t ); // if true, uses result of READ_FAST + void READ_FAST( addr_t, int& out ); // ALWAYS called BEFORE CAN_READ_FAST + bool CAN_WRITE_FAST( addr_t ); // if true, uses WRITE_FAST instead of WRITE_MEM + void WRITE_FAST( addr_t, int data ); + + // Used by instructions most often used to access the NES PPU (LDA abs and BIT abs). + // Optional; defaults to READ_MEM. + void READ_PPU( addr_t, int& out ); + // 0 <= out <= 0xFF + +// The following can be used within macros: + + // Current time + time_t TIME(); + + // Allows use of time functions + void FLUSH_TIME(); + + // Must be used before end of macro if FLUSH_TIME() was used earlier + void CACHE_TIME(); + +// Configuration (optional; commented behavior if defined) + + // Emulates dummy reads for indexed instructions + #define NES_CPU_DUMMY_READS 1 + + // Optimizes as if map_code( 0, 0x10000 + cpu_padding, FLAT_MEM ) is always in effect + #define FLAT_MEM my_mem_array + + // Expanded just before beginning of code, to help debugger + #define CPU_BEGIN void my_run_cpu() { + +#endif + +/* Copyright (C) 2003-2008 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +// Allows MWCW debugger to step through code properly +#ifdef CPU_BEGIN + CPU_BEGIN +#endif + +// Time +#define TIME() (s_time + s.base) +#define FLUSH_TIME() {s.time = s_time - time_offset;} +#define CACHE_TIME() {s_time = s.time + time_offset;} + +// Defaults +#ifndef CAN_WRITE_FAST + #define CAN_WRITE_FAST( addr ) 0 + #define WRITE_FAST( addr, data ) +#endif + +#ifndef CAN_READ_FAST + #define CAN_READ_FAST( addr ) 0 + #define READ_FAST( addr, out ) +#endif + +#ifndef READ_PPU + #define READ_PPU( addr, out )\ + {\ + FLUSH_TIME();\ + out = READ_MEM( addr );\ + CACHE_TIME();\ + } +#endif + +#define READ_STACK READ_LOW +#define WRITE_STACK WRITE_LOW + +// Dummy reads +#ifdef NES_CPU_DUMMY_READS + // TODO: optimize time handling + #define DUMMY_READ( addr, idx ) \ + if ( (addr & 0xFF) < idx )\ + {\ + int const time_offset = 1;\ + FLUSH_TIME();\ + READ_MEM( (addr - 0x100) );\ + CACHE_TIME();\ + } +#else + #define DUMMY_READ( addr, idx ) +#endif + +// Code +#ifdef FLAT_MEM + #define CODE_PAGE( addr ) (FLAT_MEM) + #define CODE_OFFSET( addr ) (addr) +#else + #define CODE_PAGE( addr ) (s.code_map [NES_CPU_PAGE( addr )]) + #define CODE_OFFSET( addr ) NES_CPU_OFFSET( addr ) +#endif +#define READ_CODE( addr ) (CODE_PAGE( addr ) [CODE_OFFSET( addr )]) + +// Stack +#define SET_SP( v ) (sp = ((v) + 1) | 0x100) +#define GET_SP() ((sp - 1) & 0xFF) +#define SP( o ) ((sp + (o - (o>0)*0x100)) | 0x100) + +// Truncation +#define BYTE( n ) ((uint8_t ) (n)) /* (unsigned) n & 0xFF */ +#define SBYTE( n ) ((int8_t ) (n)) /* (BYTE( n ) ^ 0x80) - 0x80 */ +#define WORD( n ) ((uint16_t) (n)) /* (unsigned) n & 0xFFFF */ + +// Flags with hex value for clarity when used as mask. +// Stored in indicated variable during emulation. +int const n80 = 0x80; // nz +int const v40 = 0x40; // flags +int const r20 = 0x20; +int const b10 = 0x10; +int const d08 = 0x08; // flags +int const i04 = 0x04; // flags +int const z02 = 0x02; // nz +int const c01 = 0x01; // c + +#define IS_NEG (nz & 0x8080) + +#define GET_FLAGS( out ) \ +{\ + out = flags & (v40 | d08 | i04);\ + out += ((nz >> 8) | nz) & n80;\ + out += c >> 8 & c01;\ + if ( !BYTE( nz ) )\ + out += z02;\ +} + +#define SET_FLAGS( in ) \ +{\ + flags = in & (v40 | d08 | i04);\ + c = nz = in << 8;\ + nz += ~in & z02;\ +} + +{ + int const time_offset = 0; + + // Local state + struct cpu_state_t s; + #ifdef FLAT_MEM + s.base = cpu->cpu_state_.base; + #else + s = cpu->cpu_state_; + #endif + cpu->cpu_state = &s; + int s_time = cpu->cpu_state_.time; // helps even on x86 + + // Registers + int pc = cpu->r.pc; + int a = cpu->r.a; + int x = cpu->r.x; + int y = cpu->r.y; + int sp; + SET_SP( cpu->r.sp ); + + // Flags + int flags; + int c; // carry set if (c & 0x100) != 0 + int nz; // Z set if (nz & 0xFF) == 0, N set if (nz & 0x8080) != 0 + { + int temp = cpu->r.flags; + SET_FLAGS( temp ); + } + +loop: + + // Check all values + check( (unsigned) sp - 0x100 < 0x100 ); + check( (unsigned) pc < 0x10000 ); + check( (unsigned) a < 0x100 ); + check( (unsigned) x < 0x100 ); + check( (unsigned) y < 0x100 ); + + // Read instruction + byte const* instr = CODE_PAGE( pc ); + int opcode; + + if ( CODE_OFFSET(~0) == ~0 ) + { + opcode = instr [pc]; + pc++; + instr += pc; + } + else + { + instr += CODE_OFFSET( pc ); + opcode = *instr++; + pc++; + } + + // local to function in case it helps optimizer + static byte const clock_table [256] = + {// 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0,6,2,8,3,3,5,5,3,2,2,2,4,4,6,6,// 0 + 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 1 + 6,6,0,8,3,3,5,5,4,2,2,2,4,4,6,6,// 2 + 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 3 + 6,6,2,8,3,3,5,5,3,2,2,2,3,4,6,6,// 4 + 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 5 + 6,6,2,8,3,3,5,5,4,2,2,2,5,4,6,6,// 6 + 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 7 + 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// 8 + 2,6,2,6,4,4,4,4,2,5,2,5,5,5,5,5,// 9 + 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// A + 2,5,2,5,4,4,4,4,2,4,2,4,4,4,4,4,// B + 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// C + 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// D + 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// E + 2,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F + }; // 0x00 was 7 and 0x22 was 2 + + // Update time + if ( s_time >= 0 ) + goto out_of_time; + + #ifdef CPU_INSTR_HOOK + { CPU_INSTR_HOOK( (pc-1), (&instr [-1]), a, x, y, GET_SP(), TIME() ); } + #endif + + s_time += clock_table [opcode]; + + int data; + data = *instr; + + switch ( opcode ) + { + +// Macros + +#define GET_MSB() (instr [1]) +#define ADD_PAGE( out ) (pc++, out = data + 0x100 * GET_MSB()) +#define GET_ADDR() GET_LE16( instr ) + +#define PAGE_PENALTY( lsb ) s_time += (lsb) >> 8; + +#define INC_DEC( reg, n ) reg = BYTE( nz = reg + n ); goto loop; + +#define IND_Y( cross, out ) {\ + int temp = READ_LOW( data ) + y;\ + out = temp + 0x100 * READ_LOW( BYTE( data + 1 ) );\ + cross( temp );\ + } + +#define IND_X( out ) {\ + int temp = data + x;\ + out = 0x100 * READ_LOW( BYTE( temp + 1 ) ) + READ_LOW( BYTE( temp ) );\ + } + +#define ARITH_ADDR_MODES( op )\ +case op - 0x04: /* (ind,x) */\ + IND_X( data )\ + goto ptr##op;\ +case op + 0x0C: /* (ind),y */\ + IND_Y( PAGE_PENALTY, data )\ + goto ptr##op;\ +case op + 0x10: /* zp,X */\ + data = BYTE( data + x );\ +case op + 0x00: /* zp */\ + data = READ_LOW( data );\ + goto imm##op;\ +case op + 0x14: /* abs,Y */\ + data += y;\ + goto ind##op;\ +case op + 0x18: /* abs,X */\ + data += x;\ +ind##op:\ + PAGE_PENALTY( data );\ +case op + 0x08: /* abs */\ + ADD_PAGE( data );\ +ptr##op:\ + FLUSH_TIME();\ + data = READ_MEM( data );\ + CACHE_TIME();\ +case op + 0x04: /* imm */\ +imm##op: + +// TODO: more efficient way to handle negative branch that wraps PC around +#define BRANCH( cond )\ +{\ + ++pc;\ + if ( !(cond) ) goto loop;\ + s_time++;\ + int offset = SBYTE( data );\ + s_time += (BYTE(pc) + offset) >> 8 & 1;\ + pc = WORD( pc + offset );\ + goto loop;\ +} + +// Often-Used + + case 0xB5: // LDA zp,x + a = nz = READ_LOW( BYTE( data + x ) ); + pc++; + goto loop; + + case 0xA5: // LDA zp + a = nz = READ_LOW( data ); + pc++; + goto loop; + + case 0xD0: // BNE + BRANCH( BYTE( nz ) ); + + case 0x20: { // JSR + int temp = pc + 1; + pc = GET_ADDR(); + WRITE_STACK( SP( -1 ), temp >> 8 ); + sp = SP( -2 ); + WRITE_STACK( sp, temp ); + goto loop; + } + + case 0x4C: // JMP abs + pc = GET_ADDR(); + goto loop; + + case 0xE8: // INX + INC_DEC( x, 1 ) + + case 0x10: // BPL + BRANCH( !IS_NEG ) + + ARITH_ADDR_MODES( 0xC5 ) // CMP + nz = a - data; + pc++; + c = ~nz; + nz &= 0xFF; + goto loop; + + case 0x30: // BMI + BRANCH( IS_NEG ) + + case 0xF0: // BEQ + BRANCH( !BYTE( nz ) ); + + case 0x95: // STA zp,x + data = BYTE( data + x ); + case 0x85: // STA zp + pc++; + WRITE_LOW( data, a ); + goto loop; + + case 0xC8: // INY + INC_DEC( y, 1 ) + + case 0xA8: // TAY + y = a; + nz = a; + goto loop; + + case 0x98: // TYA + a = y; + nz = y; + goto loop; + + case 0xAD:{// LDA abs + int addr = GET_ADDR(); + pc += 2; + READ_PPU( addr, a = nz ); + goto loop; + } + + case 0x60: // RTS + pc = 1 + READ_STACK( sp ); + pc += 0x100 * READ_STACK( SP( 1 ) ); + sp = SP( 2 ); + goto loop; + + { + int addr; + + case 0x8D: // STA abs + addr = GET_ADDR(); + pc += 2; + if ( CAN_WRITE_FAST( addr ) ) + { + WRITE_FAST( addr, a ); + goto loop; + } + sta_ptr: + FLUSH_TIME(); + WRITE_MEM( addr, a ); + CACHE_TIME(); + goto loop; + + case 0x99: // STA abs,Y + addr = y + GET_ADDR(); + pc += 2; + if ( CAN_WRITE_FAST( addr ) ) + { + WRITE_FAST( addr, a ); + goto loop; + } + goto sta_abs_x; + + case 0x9D: // STA abs,X (slightly more common than STA abs) + addr = x + GET_ADDR(); + pc += 2; + if ( CAN_WRITE_FAST( addr ) ) + { + WRITE_FAST( addr, a ); + goto loop; + } + DUMMY_READ( addr, x ); + sta_abs_x: + FLUSH_TIME(); + WRITE_MEM( addr, a ); + CACHE_TIME(); + goto loop; + + case 0x91: // STA (ind),Y + #define NO_PAGE_PENALTY( lsb ) + IND_Y( NO_PAGE_PENALTY, addr ) + pc++; + DUMMY_READ( addr, y ); + goto sta_ptr; + + case 0x81: // STA (ind,X) + IND_X( addr ) + pc++; + goto sta_ptr; + + } + + case 0xA9: // LDA #imm + pc++; + a = data; + nz = data; + goto loop; + + // common read instructions + { + int addr; + + case 0xA1: // LDA (ind,X) + IND_X( addr ) + pc++; + goto a_nz_read_addr; + + case 0xB1:// LDA (ind),Y + addr = READ_LOW( data ) + y; + PAGE_PENALTY( addr ); + addr += 0x100 * READ_LOW( BYTE( data + 1 ) ); + pc++; + READ_FAST( addr, a = nz ); + if ( CAN_READ_FAST( addr ) ) + goto loop; + DUMMY_READ( addr, y ); + goto a_nz_read_addr; + + case 0xB9: // LDA abs,Y + PAGE_PENALTY( data + y ); + addr = GET_ADDR() + y; + pc += 2; + READ_FAST( addr, a = nz ); + if ( CAN_READ_FAST( addr ) ) + goto loop; + goto a_nz_read_addr; + + case 0xBD: // LDA abs,X + PAGE_PENALTY( data + x ); + addr = GET_ADDR() + x; + pc += 2; + READ_FAST( addr, a = nz ); + if ( CAN_READ_FAST( addr ) ) + goto loop; + DUMMY_READ( addr, x ); + a_nz_read_addr: + FLUSH_TIME(); + a = nz = READ_MEM( addr ); + CACHE_TIME(); + goto loop; + + } + +// Branch + + case 0x50: // BVC + BRANCH( !(flags & v40) ) + + case 0x70: // BVS + BRANCH( flags & v40 ) + + case 0xB0: // BCS + BRANCH( c & 0x100 ) + + case 0x90: // BCC + BRANCH( !(c & 0x100) ) + +// Load/store + + case 0x94: // STY zp,x + data = BYTE( data + x ); + case 0x84: // STY zp + pc++; + WRITE_LOW( data, y ); + goto loop; + + case 0x96: // STX zp,y + data = BYTE( data + y ); + case 0x86: // STX zp + pc++; + WRITE_LOW( data, x ); + goto loop; + + case 0xB6: // LDX zp,y + data = BYTE( data + y ); + case 0xA6: // LDX zp + data = READ_LOW( data ); + case 0xA2: // LDX #imm + pc++; + x = data; + nz = data; + goto loop; + + case 0xB4: // LDY zp,x + data = BYTE( data + x ); + case 0xA4: // LDY zp + data = READ_LOW( data ); + case 0xA0: // LDY #imm + pc++; + y = data; + nz = data; + goto loop; + + case 0xBC: // LDY abs,X + data += x; + PAGE_PENALTY( data ); + case 0xAC:{// LDY abs + int addr = data + 0x100 * GET_MSB(); + pc += 2; + FLUSH_TIME(); + y = nz = READ_MEM( addr ); + CACHE_TIME(); + goto loop; + } + + case 0xBE: // LDX abs,y + data += y; + PAGE_PENALTY( data ); + case 0xAE:{// LDX abs + int addr = data + 0x100 * GET_MSB(); + pc += 2; + FLUSH_TIME(); + x = nz = READ_MEM( addr ); + CACHE_TIME(); + goto loop; + } + + { + int temp; + case 0x8C: // STY abs + temp = y; + goto store_abs; + + case 0x8E: // STX abs + temp = x; + store_abs: + { + int addr = GET_ADDR(); + pc += 2; + if ( CAN_WRITE_FAST( addr ) ) + { + WRITE_FAST( addr, temp ); + goto loop; + } + FLUSH_TIME(); + WRITE_MEM( addr, temp ); + CACHE_TIME(); + goto loop; + } + } + +// Compare + + case 0xEC: {// CPX abs + int addr = GET_ADDR(); + pc++; + FLUSH_TIME(); + data = READ_MEM( addr ); + CACHE_TIME(); + goto cpx_data; + } + + case 0xE4: // CPX zp + data = READ_LOW( data ); + case 0xE0: // CPX #imm + cpx_data: + nz = x - data; + pc++; + c = ~nz; + nz &= 0xFF; + goto loop; + + case 0xCC:{// CPY abs + int addr = GET_ADDR(); + pc++; + FLUSH_TIME(); + data = READ_MEM( addr ); + CACHE_TIME(); + goto cpy_data; + } + + case 0xC4: // CPY zp + data = READ_LOW( data ); + case 0xC0: // CPY #imm + cpy_data: + nz = y - data; + pc++; + c = ~nz; + nz &= 0xFF; + goto loop; + +// Logical + + ARITH_ADDR_MODES( 0x25 ) // AND + nz = (a &= data); + pc++; + goto loop; + + ARITH_ADDR_MODES( 0x45 ) // EOR + nz = (a ^= data); + pc++; + goto loop; + + ARITH_ADDR_MODES( 0x05 ) // ORA + nz = (a |= data); + pc++; + goto loop; + + case 0x2C:{// BIT abs + int addr = GET_ADDR(); + pc += 2; + READ_PPU( addr, nz ); + flags = (flags & ~v40) + (nz & v40); + if ( a & nz ) + goto loop; + nz <<= 8; // result must be zero, even if N bit is set + goto loop; + } + + case 0x24: // BIT zp + nz = READ_LOW( data ); + pc++; + flags = (flags & ~v40) + (nz & v40); + if ( a & nz ) + goto loop; // Z should be clear, and nz must be non-zero if nz & a is + nz <<= 8; // set Z flag without affecting N flag + goto loop; + +// Add/subtract + + ARITH_ADDR_MODES( 0xE5 ) // SBC + case 0xEB: // unofficial equivalent + data ^= 0xFF; + goto adc_imm; + + ARITH_ADDR_MODES( 0x65 ) // ADC + adc_imm: { + int carry = c >> 8 & 1; + int ov = (a ^ 0x80) + carry + SBYTE( data ); + flags = (flags & ~v40) + (ov >> 2 & v40); + c = nz = a + data + carry; + pc++; + a = BYTE( nz ); + goto loop; + } + +// Shift/rotate + + case 0x4A: // LSR A + c = 0; + case 0x6A: // ROR A + nz = c >> 1 & 0x80; + c = a << 8; + nz += a >> 1; + a = nz; + goto loop; + + case 0x0A: // ASL A + nz = a << 1; + c = nz; + a = BYTE( nz ); + goto loop; + + case 0x2A: { // ROL A + nz = a << 1; + int temp = c >> 8 & 1; + c = nz; + nz += temp; + a = BYTE( nz ); + goto loop; + } + + case 0x5E: // LSR abs,X + data += x; + case 0x4E: // LSR abs + c = 0; + case 0x6E: // ROR abs + ror_abs: { + ADD_PAGE( data ); + FLUSH_TIME(); + int temp = READ_MEM( data ); + nz = (c >> 1 & 0x80) + (temp >> 1); + c = temp << 8; + goto rotate_common; + } + + case 0x3E: // ROL abs,X + data += x; + goto rol_abs; + + case 0x1E: // ASL abs,X + data += x; + case 0x0E: // ASL abs + c = 0; + case 0x2E: // ROL abs + rol_abs: + ADD_PAGE( data ); + nz = c >> 8 & 1; + FLUSH_TIME(); + nz += (c = READ_MEM( data ) << 1); + rotate_common: + pc++; + WRITE_MEM( data, BYTE( nz ) ); + CACHE_TIME(); + goto loop; + + case 0x7E: // ROR abs,X + data += x; + goto ror_abs; + + case 0x76: // ROR zp,x + data = BYTE( data + x ); + goto ror_zp; + + case 0x56: // LSR zp,x + data = BYTE( data + x ); + case 0x46: // LSR zp + c = 0; + case 0x66: // ROR zp + ror_zp: { + int temp = READ_LOW( data ); + nz = (c >> 1 & 0x80) + (temp >> 1); + c = temp << 8; + goto write_nz_zp; + } + + case 0x36: // ROL zp,x + data = BYTE( data + x ); + goto rol_zp; + + case 0x16: // ASL zp,x + data = BYTE( data + x ); + case 0x06: // ASL zp + c = 0; + case 0x26: // ROL zp + rol_zp: + nz = c >> 8 & 1; + nz += (c = READ_LOW( data ) << 1); + goto write_nz_zp; + +// Increment/decrement + + case 0xCA: // DEX + INC_DEC( x, -1 ) + + case 0x88: // DEY + INC_DEC( y, -1 ) + + case 0xF6: // INC zp,x + data = BYTE( data + x ); + case 0xE6: // INC zp + nz = 1; + goto add_nz_zp; + + case 0xD6: // DEC zp,x + data = BYTE( data + x ); + case 0xC6: // DEC zp + nz = -1; + add_nz_zp: + nz += READ_LOW( data ); + write_nz_zp: + pc++; + WRITE_LOW( data, nz ); + goto loop; + + case 0xFE: // INC abs,x + data = x + GET_ADDR(); + goto inc_ptr; + + case 0xEE: // INC abs + data = GET_ADDR(); + inc_ptr: + nz = 1; + goto inc_common; + + case 0xDE: // DEC abs,x + data = x + GET_ADDR(); + goto dec_ptr; + + case 0xCE: // DEC abs + data = GET_ADDR(); + dec_ptr: + nz = -1; + inc_common: + FLUSH_TIME(); + pc += 2; + nz += READ_MEM( data ); + WRITE_MEM( data, BYTE( nz ) ); + CACHE_TIME(); + goto loop; + +// Transfer + + case 0xAA: // TAX + x = nz = a; + goto loop; + + case 0x8A: // TXA + a = nz = x; + goto loop; + + case 0x9A: // TXS + SET_SP( x ); // verified (no flag change) + goto loop; + + case 0xBA: // TSX + x = nz = GET_SP(); + goto loop; + +// Stack + + case 0x48: // PHA + sp = SP( -1 ); + WRITE_STACK( sp, a ); + goto loop; + + case 0x68: // PLA + a = nz = READ_STACK( sp ); + sp = SP( 1 ); + goto loop; + + case 0x40:{// RTI + pc = READ_STACK( SP( 1 ) ); + pc += READ_STACK( SP( 2 ) ) * 0x100; + int temp = READ_STACK( sp ); + sp = SP( 3 ); + data = flags; + SET_FLAGS( temp ); + cpu->r.flags = flags; // update externally-visible I flag + int delta = s.base - cpu->irq_time; + if ( delta <= 0 ) goto loop; // end_time < irq_time + if ( flags & i04 ) goto loop; + s_time += delta; + s.base = cpu->irq_time; + goto loop; + } + + case 0x28:{// PLP + int temp = READ_STACK( sp ); + sp = SP( 1 ); + int changed = flags ^ temp; + SET_FLAGS( temp ); + if ( !(changed & i04) ) + goto loop; // I flag didn't change + if ( flags & i04 ) + goto handle_sei; + goto handle_cli; + } + + case 0x08:{// PHP + int temp; + GET_FLAGS( temp ); + sp = SP( -1 ); + WRITE_STACK( sp, temp | (b10 | r20) ); + goto loop; + } + + case 0x6C:{// JMP (ind) + data = GET_ADDR(); + byte const* page = CODE_PAGE( data ); + pc = page [CODE_OFFSET( data )]; + data = (data & 0xFF00) + ((data + 1) & 0xFF); + pc += page [CODE_OFFSET( data )] * 0x100; + goto loop; + } + + case 0x00: // BRK + goto handle_brk; + +// Flags + + case 0x38: // SEC + c = 0x100; + goto loop; + + case 0x18: // CLC + c = 0; + goto loop; + + case 0xB8: // CLV + flags &= ~v40; + goto loop; + + case 0xD8: // CLD + flags &= ~d08; + goto loop; + + case 0xF8: // SED + flags |= d08; + goto loop; + + case 0x58: // CLI + if ( !(flags & i04) ) + goto loop; + flags &= ~i04; + handle_cli: { + //dprintf( "CLI at %d\n", TIME ); + cpu->r.flags = flags; // update externally-visible I flag + int delta = s.base - cpu->irq_time; + if ( delta <= 0 ) + { + if ( TIME() < cpu->irq_time ) + goto loop; + goto delayed_cli; + } + s.base = cpu->irq_time; + s_time += delta; + if ( s_time < 0 ) + goto loop; + + if ( delta >= s_time + 1 ) + { + // delayed irq until after next instruction + s.base += s_time + 1; + s_time = -1; + goto loop; + } + + // TODO: implement + delayed_cli: + dprintf( "Delayed CLI not emulated\n" ); + goto loop; + } + + case 0x78: // SEI + if ( flags & i04 ) + goto loop; + flags |= i04; + handle_sei: { + cpu->r.flags = flags; // update externally-visible I flag + int delta = s.base - cpu->end_time; + s.base = cpu->end_time; + s_time += delta; + if ( s_time < 0 ) + goto loop; + + dprintf( "Delayed SEI not emulated\n" ); + goto loop; + } + +// Unofficial + + // SKW - skip word + case 0x1C: case 0x3C: case 0x5C: case 0x7C: case 0xDC: case 0xFC: + PAGE_PENALTY( data + x ); + case 0x0C: + pc++; + // SKB - skip byte + case 0x74: case 0x04: case 0x14: case 0x34: case 0x44: case 0x54: case 0x64: + case 0x80: case 0x82: case 0x89: case 0xC2: case 0xD4: case 0xE2: case 0xF4: + pc++; + goto loop; + + // NOP + case 0xEA: case 0x1A: case 0x3A: case 0x5A: case 0x7A: case 0xDA: case 0xFA: + goto loop; + + case halt_opcode: // HLT - halt processor + if ( pc-- > 0x10000 ) + { + // handle wrap-around (assumes caller has put page of HLT at 0x10000) + pc = WORD( pc ); + goto loop; + } + case 0x02: case 0x12: case 0x32: case 0x42: case 0x52: + case 0x62: case 0x72: case 0x92: case 0xB2: case 0xD2: case 0xF2: + goto stop; + +// Unimplemented + + case 0xFF: // force 256-entry jump table for optimization purposes + c |= 1; // compiler doesn't know that this won't affect anything + default: + check( (unsigned) opcode < 0x100 ); + + #ifdef UNIMPL_INSTR + UNIMPL_INSTR(); + #endif + + // At least skip over proper number of bytes instruction uses + static unsigned char const illop_lens [8] = { + 0x40, 0x40, 0x40, 0x80, 0x40, 0x40, 0x80, 0xA0 + }; + int opcode = instr [-1]; + int len = illop_lens [opcode >> 2 & 7] >> (opcode << 1 & 6) & 3; + if ( opcode == 0x9C ) + len = 2; + pc += len; + + // Account for extra clock + if ( (opcode >> 4) == 0x0B ) + { + if ( opcode == 0xB3 ) + data = READ_LOW( data ); + if ( opcode != 0xB7 ) + PAGE_PENALTY( data + y ); + } + goto loop; + } + assert( false ); // catch missing 'goto loop' or accidental 'break' + + int result_; +handle_brk: + pc++; + result_ = b10 | 4; + +#ifdef CPU_DONE +interrupt: +#endif + { + s_time += 7; + + // Save PC and read vector + WRITE_STACK( SP( -1 ), pc >> 8 ); + WRITE_STACK( SP( -2 ), pc ); + pc = GET_LE16( &READ_CODE( 0xFFFA ) + (result_ & 4) ); + + // Save flags + int temp; + GET_FLAGS( temp ); + temp |= r20 + (result_ & b10); // B flag set for BRK + sp = SP( -3 ); + WRITE_STACK( sp, temp ); + + // Update I flag in externally-visible flags + cpu->r.flags = (flags |= i04); + + // Update time + int delta = s.base - cpu->end_time; + if ( delta >= 0 ) + goto loop; + s_time += delta; + s.base = cpu->end_time; + goto loop; + } + +out_of_time: + pc--; + + // Optional action that triggers interrupt or changes irq/end time + #ifdef CPU_DONE + { + CPU_DONE( result_ ); + if ( result_ >= 0 ) + goto interrupt; + if ( s_time < 0 ) + goto loop; + } + #endif +stop: + + // Flush cached state + cpu->r.pc = pc; + cpu->r.sp = GET_SP(); + cpu->r.a = a; + cpu->r.x = x; + cpu->r.y = y; + + int temp; + GET_FLAGS( temp ); + cpu->r.flags = temp; + + cpu->cpu_state_.base = s.base; + cpu->cpu_state_.time = s_time; + cpu->cpu_state = &cpu->cpu_state_; +} diff --git a/apps/codecs/libgme/nes_vrc7_apu.c b/apps/codecs/libgme/nes_vrc7_apu.c index 95bc676..8d3c2e8 100644 --- a/apps/codecs/libgme/nes_vrc7_apu.c +++ b/apps/codecs/libgme/nes_vrc7_apu.c @@ -1,88 +1,88 @@ -
-#include "nes_vrc7_apu.h"
-#include "blargg_source.h"
-
-int const period = 36; // NES CPU clocks per FM clock
-
-void Vrc7_init( struct Nes_Vrc7_Apu* this )
-{
- Synth_init( &this->synth );
-
- OPLL_new ( &this->opll, 3579545, 3579545 / 72 );
- OPLL_reset_patch( &this->opll, OPLL_VRC7_TONE );
-
- this->osc.output = 0;
- this->osc.last_amp = 0;
- this->mask = 0;
-
- Vrc7_volume( this, (int)FP_ONE_VOLUME );
- Vrc7_reset( this );
-}
-
-void Vrc7_reset( struct Nes_Vrc7_Apu* this )
-{
- this->addr = 0;
- this->next_time = 0;
- this->osc.last_amp = 0;
-
- OPLL_reset (&this->opll);
- OPLL_setMask(&this->opll, this->mask);
-}
-
-void Vrc7_set_rate( struct Nes_Vrc7_Apu* this, int r )
-{
- OPLL_set_quality( &this->opll, r < 44100 ? 0 : 1 );
-}
-
-void Vrc7_write_reg( struct Nes_Vrc7_Apu* this, int data )
-{
- this->addr = data;
-}
-
-void Vrc7_run_until( struct Nes_Vrc7_Apu* this, blip_time_t end_time );
-void Vrc7_write_data( struct Nes_Vrc7_Apu* this, blip_time_t time, int data )
-{
- if ( time > this->next_time )
- Vrc7_run_until( this, time );
-
- OPLL_writeIO( &this->opll, 0, this->addr );
- OPLL_writeIO( &this->opll, 1, data );
-}
-
-void Vrc7_end_frame( struct Nes_Vrc7_Apu* this, blip_time_t time )
-{
- if ( time > this->next_time )
- Vrc7_run_until( this, time );
-
- this->next_time -= time;
- assert( this->next_time >= 0 );
-
- if ( this->osc.output )
- Blip_set_modified( this->osc.output );
-}
-
-void Vrc7_run_until( struct Nes_Vrc7_Apu* this, blip_time_t end_time )
-{
- require( end_time > this->next_time );
-
- blip_time_t time = this->next_time;
- OPLL* opll = &this->opll; // cache
- struct Blip_Buffer* const output = this-> osc.output;
- if ( output )
- {
- do
- {
- int amp = OPLL_calc( opll ) << 1;
- int delta = amp - this->osc.last_amp;
- if ( delta )
- {
- this->osc.last_amp = amp;
- Synth_offset_inline( &this->synth, time, delta, output );
- }
- time += period;
- }
- while ( time < end_time );
- }
-
- this->next_time = time;
-}
+ +#include "nes_vrc7_apu.h" +#include "blargg_source.h" + +int const period = 36; // NES CPU clocks per FM clock + +void Vrc7_init( struct Nes_Vrc7_Apu* this ) +{ + Synth_init( &this->synth ); + + OPLL_new ( &this->opll, 3579545, 3579545 / 72 ); + OPLL_reset_patch( &this->opll, OPLL_VRC7_TONE ); + + this->osc.output = 0; + this->osc.last_amp = 0; + this->mask = 0; + + Vrc7_volume( this, (int)FP_ONE_VOLUME ); + Vrc7_reset( this ); +} + +void Vrc7_reset( struct Nes_Vrc7_Apu* this ) +{ + this->addr = 0; + this->next_time = 0; + this->osc.last_amp = 0; + + OPLL_reset (&this->opll); + OPLL_setMask(&this->opll, this->mask); +} + +void Vrc7_set_rate( struct Nes_Vrc7_Apu* this, int r ) +{ + OPLL_set_quality( &this->opll, r < 44100 ? 0 : 1 ); +} + +void Vrc7_write_reg( struct Nes_Vrc7_Apu* this, int data ) +{ + this->addr = data; +} + +void Vrc7_run_until( struct Nes_Vrc7_Apu* this, blip_time_t end_time ); +void Vrc7_write_data( struct Nes_Vrc7_Apu* this, blip_time_t time, int data ) +{ + if ( time > this->next_time ) + Vrc7_run_until( this, time ); + + OPLL_writeIO( &this->opll, 0, this->addr ); + OPLL_writeIO( &this->opll, 1, data ); +} + +void Vrc7_end_frame( struct Nes_Vrc7_Apu* this, blip_time_t time ) +{ + if ( time > this->next_time ) + Vrc7_run_until( this, time ); + + this->next_time -= time; + assert( this->next_time >= 0 ); + + if ( this->osc.output ) + Blip_set_modified( this->osc.output ); +} + +void Vrc7_run_until( struct Nes_Vrc7_Apu* this, blip_time_t end_time ) +{ + require( end_time > this->next_time ); + + blip_time_t time = this->next_time; + OPLL* opll = &this->opll; // cache + struct Blip_Buffer* const output = this-> osc.output; + if ( output ) + { + do + { + int amp = OPLL_calc( opll ) << 1; + int delta = amp - this->osc.last_amp; + if ( delta ) + { + this->osc.last_amp = amp; + Synth_offset_inline( &this->synth, time, delta, output ); + } + time += period; + } + while ( time < end_time ); + } + + this->next_time = time; +} diff --git a/apps/codecs/libgme/opl_apu.c b/apps/codecs/libgme/opl_apu.c index 64b2714..b573bae 100644 --- a/apps/codecs/libgme/opl_apu.c +++ b/apps/codecs/libgme/opl_apu.c @@ -1,198 +1,198 @@ -#include "opl_apu.h"
-
-#include "blargg_source.h"
-
-/* NOTE: Removed unused chips ~ gama */
-
-blargg_err_t Opl_init( struct Opl_Apu* this, long clock, long rate, blip_time_t period, enum opl_type_t type )
-{
- Synth_init( &this->synth );
-
- this->type_ = type;
- this->clock_ = clock;
- this->rate_ = rate;
- this->period_ = period;
- Opl_set_output( this, 0 );
- Opl_volume( this, (int)FP_ONE_VOLUME );
-
- switch (type)
- {
- case type_opll:
- case type_msxmusic:
- case type_smsfmunit:
- OPLL_new ( &this->opll, clock, rate );
- OPLL_reset_patch( &this->opll, OPLL_2413_TONE );
- break;
- case type_vrc7:
- OPLL_new ( &this->opll, clock, rate );
- OPLL_reset_patch( &this->opll, OPLL_VRC7_TONE );
- break;
- case type_msxaudio:
- OPL_init( &this->opl, this->opl_memory, sizeof this->opl_memory );
- OPL_setSampleRate( &this->opl, rate, clock );
- OPL_setInternalVolume(&this->opl, 1 << 13);
- break;
- }
-
- Opl_reset( this );
- return 0;
-}
-
-void Opl_shutdown( struct Opl_Apu* this )
-{
- switch (this->type_)
- {
- case type_opll:
- case type_msxmusic:
- case type_smsfmunit:
- case type_vrc7:
- OPLL_delete( &this->opll );
- break;
- case type_msxaudio: break;
- }
-}
-
-void Opl_reset( struct Opl_Apu* this )
-{
- this->addr = 0;
- this->next_time = 0;
- this->last_amp = 0;
-
- switch (this->type_)
- {
- case type_opll:
- case type_msxmusic:
- case type_smsfmunit:
- case type_vrc7:
- OPLL_reset( &this->opll );
- OPLL_setMask( &this->opll, 0 );
- break;
- case type_msxaudio:
- OPL_reset( &this->opl );
- break;
- }
-}
-
-static void run_until( struct Opl_Apu* this, blip_time_t end_time );
-void Opl_write_data( struct Opl_Apu* this, blip_time_t time, int data )
-{
- run_until( this, time );
- switch (this->type_)
- {
- case type_opll:
- case type_msxmusic:
- case type_smsfmunit:
- case type_vrc7:
- OPLL_writeIO( &this->opll, 0, this->addr );
- OPLL_writeIO( &this->opll, 1, data );
- break;
- case type_msxaudio:
- OPL_writeReg( &this->opl, this->addr, data );
- break;
- }
-}
-
-int Opl_read( struct Opl_Apu* this, blip_time_t time, int port )
-{
- run_until( this, time );
- switch (this->type_)
- {
- case type_opll:
- case type_msxmusic:
- case type_smsfmunit:
- case type_vrc7:
- return OPLL_read( &this->opll, port );
- case type_msxaudio:
- return OPL_readStatus( &this->opl );
- }
-
- return 0;
-}
-
-void Opl_end_frame( struct Opl_Apu* this, blip_time_t time )
-{
- run_until( this, time );
- this->next_time -= time;
-
- if ( this->output_ )
- Blip_set_modified( this->output_ );
-}
-
-static void run_until( struct Opl_Apu* this, blip_time_t end_time )
-{
- if ( end_time > this->next_time )
- {
- blip_time_t time_delta = end_time - this->next_time;
- blip_time_t time = this->next_time;
- unsigned count = time_delta / this->period_ + 1;
- switch (this->type_)
- {
- case type_opll:
- case type_msxmusic:
- case type_smsfmunit:
- case type_vrc7:
- {
- OPLL* opll = &this->opll; // cache
- struct Blip_Buffer* const output = this->output_;
- while ( count > 0 )
- {
- unsigned todo = count;
- if ( todo > 1024 ) todo = 1024;
- short *buffer = OPLL_update_buffer(opll, todo);
-
- if ( output && buffer )
- {
- int last_amp = this->last_amp;
- unsigned i;
- for ( i = 0; i < todo; i++ )
- {
- int amp = buffer [i];
- int delta = amp - last_amp;
- if ( delta )
- {
- last_amp = amp;
- Synth_offset_inline( &this->synth, time, delta, output );
- }
- time += this->period_;
- }
- this->last_amp = last_amp;
- }
- count -= todo;
- }
- }
- break;
- case type_msxaudio:
- {
- struct Y8950* opl = &this->opl;
- struct Blip_Buffer* const output = this->output_;
- while ( count > 0 )
- {
- unsigned todo = count;
- if ( todo > 1024 ) todo = 1024;
- int *buffer = OPL_updateBuffer(opl, todo);
-
- if ( output && buffer )
- {
- int last_amp = this->last_amp;
- unsigned i;
- for ( i = 0; i < todo; i++ )
- {
- int amp = buffer [i];
- int delta = amp - last_amp;
- if ( delta )
- {
- last_amp = amp;
- Synth_offset_inline( &this->synth, time, delta, output );
- }
- time += this->period_;
- }
- this->last_amp = last_amp;
- }
- count -= todo;
- }
- }
- break;
- }
- this->next_time = time;
- }
-}
+#include "opl_apu.h" + +#include "blargg_source.h" + +/* NOTE: Removed unused chips ~ gama */ + +blargg_err_t Opl_init( struct Opl_Apu* this, long clock, long rate, blip_time_t period, enum opl_type_t type ) +{ + Synth_init( &this->synth ); + + this->type_ = type; + this->clock_ = clock; + this->rate_ = rate; + this->period_ = period; + Opl_set_output( this, 0 ); + Opl_volume( this, (int)FP_ONE_VOLUME ); + + switch (type) + { + case type_opll: + case type_msxmusic: + case type_smsfmunit: + OPLL_new ( &this->opll, clock, rate ); + OPLL_reset_patch( &this->opll, OPLL_2413_TONE ); + break; + case type_vrc7: + OPLL_new ( &this->opll, clock, rate ); + OPLL_reset_patch( &this->opll, OPLL_VRC7_TONE ); + break; + case type_msxaudio: + OPL_init( &this->opl, this->opl_memory, sizeof this->opl_memory ); + OPL_setSampleRate( &this->opl, rate, clock ); + OPL_setInternalVolume(&this->opl, 1 << 13); + break; + } + + Opl_reset( this ); + return 0; +} + +void Opl_shutdown( struct Opl_Apu* this ) +{ + switch (this->type_) + { + case type_opll: + case type_msxmusic: + case type_smsfmunit: + case type_vrc7: + OPLL_delete( &this->opll ); + break; + case type_msxaudio: break; + } +} + +void Opl_reset( struct Opl_Apu* this ) +{ + this->addr = 0; + this->next_time = 0; + this->last_amp = 0; + + switch (this->type_) + { + case type_opll: + case type_msxmusic: + case type_smsfmunit: + case type_vrc7: + OPLL_reset( &this->opll ); + OPLL_setMask( &this->opll, 0 ); + break; + case type_msxaudio: + OPL_reset( &this->opl ); + break; + } +} + +static void run_until( struct Opl_Apu* this, blip_time_t end_time ); +void Opl_write_data( struct Opl_Apu* this, blip_time_t time, int data ) +{ + run_until( this, time ); + switch (this->type_) + { + case type_opll: + case type_msxmusic: + case type_smsfmunit: + case type_vrc7: + OPLL_writeIO( &this->opll, 0, this->addr ); + OPLL_writeIO( &this->opll, 1, data ); + break; + case type_msxaudio: + OPL_writeReg( &this->opl, this->addr, data ); + break; + } +} + +int Opl_read( struct Opl_Apu* this, blip_time_t time, int port ) +{ + run_until( this, time ); + switch (this->type_) + { + case type_opll: + case type_msxmusic: + case type_smsfmunit: + case type_vrc7: + return OPLL_read( &this->opll, port ); + case type_msxaudio: + return OPL_readStatus( &this->opl ); + } + + return 0; +} + +void Opl_end_frame( struct Opl_Apu* this, blip_time_t time ) +{ + run_until( this, time ); + this->next_time -= time; + + if ( this->output_ ) + Blip_set_modified( this->output_ ); +} + +static void run_until( struct Opl_Apu* this, blip_time_t end_time ) +{ + if ( end_time > this->next_time ) + { + blip_time_t time_delta = end_time - this->next_time; + blip_time_t time = this->next_time; + unsigned count = time_delta / this->period_ + 1; + switch (this->type_) + { + case type_opll: + case type_msxmusic: + case type_smsfmunit: + case type_vrc7: + { + OPLL* opll = &this->opll; // cache + struct Blip_Buffer* const output = this->output_; + while ( count > 0 ) + { + unsigned todo = count; + if ( todo > 1024 ) todo = 1024; + short *buffer = OPLL_update_buffer(opll, todo); + + if ( output && buffer ) + { + int last_amp = this->last_amp; + unsigned i; + for ( i = 0; i < todo; i++ ) + { + int amp = buffer [i]; + int delta = amp - last_amp; + if ( delta ) + { + last_amp = amp; + Synth_offset_inline( &this->synth, time, delta, output ); + } + time += this->period_; + } + this->last_amp = last_amp; + } + count -= todo; + } + } + break; + case type_msxaudio: + { + struct Y8950* opl = &this->opl; + struct Blip_Buffer* const output = this->output_; + while ( count > 0 ) + { + unsigned todo = count; + if ( todo > 1024 ) todo = 1024; + int *buffer = OPL_updateBuffer(opl, todo); + + if ( output && buffer ) + { + int last_amp = this->last_amp; + unsigned i; + for ( i = 0; i < todo; i++ ) + { + int amp = buffer [i]; + int delta = amp - last_amp; + if ( delta ) + { + last_amp = amp; + Synth_offset_inline( &this->synth, time, delta, output ); + } + time += this->period_; + } + this->last_amp = last_amp; + } + count -= todo; + } + } + break; + } + this->next_time = time; + } +} diff --git a/apps/codecs/libgme/opl_apu.h b/apps/codecs/libgme/opl_apu.h index f24a8d6..76fa766 100644 --- a/apps/codecs/libgme/opl_apu.h +++ b/apps/codecs/libgme/opl_apu.h @@ -1,63 +1,63 @@ -#ifndef OPL_APU_H
-#define OPL_APU_H
-
-#include "blargg_common.h"
-#include "blargg_source.h"
-#include "blip_buffer.h"
-
-#include "emu8950.h"
-#include "emu2413.h"
-
-enum opl_type_t { type_opll = 0x10, type_msxmusic = 0x11, type_smsfmunit = 0x12,
- type_vrc7 = 0x13, type_msxaudio = 0x21 };
-
-enum { opl_osc_count = 1 };
-
-struct Opl_Apu {
- struct Blip_Buffer* output_;
- enum opl_type_t type_;
-
- blip_time_t next_time;
- int last_amp;
- int addr;
-
- long clock_;
- long rate_;
- blip_time_t period_;
-
- struct Blip_Synth synth;
-
- // OPL chips
- struct Y8950 opl;
- OPLL opll;
-
- unsigned char regs[ 0x100 ];
- unsigned char opl_memory[ 32768 ];
-};
-
-blargg_err_t Opl_init( struct Opl_Apu* this, long clock, long rate, blip_time_t period, enum opl_type_t type );
-void Opl_shutdown( struct Opl_Apu* this );
-
-void Opl_reset( struct Opl_Apu* this );
-static inline void Opl_volume( struct Opl_Apu* this, int v ) { Synth_volume( &this->synth, v / (4096 * 6) ); }
-
-static inline void Opl_osc_output( struct Opl_Apu* this, int i, struct Blip_Buffer* buf )
-{
-#if defined(ROCKBOX)
- (void) i;
-#endif
- assert( (unsigned) i < opl_osc_count );
- this->output_ = buf;
-}
-
-static inline void Opl_set_output( struct Opl_Apu* this, struct Blip_Buffer* buf ) { Opl_osc_output( this, 0, buf ); }
-void Opl_end_frame( struct Opl_Apu* this, blip_time_t );
-
-static inline void Opl_write_addr( struct Opl_Apu* this, int data ) { this->addr = data; }
-void Opl_write_data( struct Opl_Apu* this, blip_time_t, int data );
-
-int Opl_read( struct Opl_Apu* this, blip_time_t, int port );
-
-static inline bool Opl_supported( void ) { return true; }
-
-#endif
+#ifndef OPL_APU_H +#define OPL_APU_H + +#include "blargg_common.h" +#include "blargg_source.h" +#include "blip_buffer.h" + +#include "emu8950.h" +#include "emu2413.h" + +enum opl_type_t { type_opll = 0x10, type_msxmusic = 0x11, type_smsfmunit = 0x12, + type_vrc7 = 0x13, type_msxaudio = 0x21 }; + +enum { opl_osc_count = 1 }; + +struct Opl_Apu { + struct Blip_Buffer* output_; + enum opl_type_t type_; + + blip_time_t next_time; + int last_amp; + int addr; + + long clock_; + long rate_; + blip_time_t period_; + + struct Blip_Synth synth; + + // OPL chips + struct Y8950 opl; + OPLL opll; + + unsigned char regs[ 0x100 ]; + unsigned char opl_memory[ 32768 ]; +}; + +blargg_err_t Opl_init( struct Opl_Apu* this, long clock, long rate, blip_time_t period, enum opl_type_t type ); +void Opl_shutdown( struct Opl_Apu* this ); + +void Opl_reset( struct Opl_Apu* this ); +static inline void Opl_volume( struct Opl_Apu* this, int v ) { Synth_volume( &this->synth, v / (4096 * 6) ); } + +static inline void Opl_osc_output( struct Opl_Apu* this, int i, struct Blip_Buffer* buf ) +{ +#if defined(ROCKBOX) + (void) i; +#endif + assert( (unsigned) i < opl_osc_count ); + this->output_ = buf; +} + +static inline void Opl_set_output( struct Opl_Apu* this, struct Blip_Buffer* buf ) { Opl_osc_output( this, 0, buf ); } +void Opl_end_frame( struct Opl_Apu* this, blip_time_t ); + +static inline void Opl_write_addr( struct Opl_Apu* this, int data ) { this->addr = data; } +void Opl_write_data( struct Opl_Apu* this, blip_time_t, int data ); + +int Opl_read( struct Opl_Apu* this, blip_time_t, int port ); + +static inline bool Opl_supported( void ) { return true; } + +#endif diff --git a/apps/codecs/libgme/opltables.h b/apps/codecs/libgme/opltables.h index 6ec10ea..50fc0a8 100644 --- a/apps/codecs/libgme/opltables.h +++ b/apps/codecs/libgme/opltables.h @@ -1,242 +1,242 @@ -#ifndef _OPLTABLES_H_
-#define _OPLTABLES_H_
-
-/* Precalculated emu8950 tables for use in Rockbox,
- Calculated for 44Khz sampling rate */
-
-static const short ar_adjust_coeff[] = {
- 255, 227, 210, 198, 189, 181, 175, 170, 165, 161, 157,
- 153, 150, 147, 144, 141, 139, 136, 134, 132, 130, 128,
- 126, 125, 123, 121, 120, 118, 117, 115, 114, 113, 112,
- 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100,
- 99, 98, 97, 96, 95, 94, 94, 93, 92, 91, 91,
- 90, 89, 88, 88, 87, 86, 86, 85, 84, 84, 83,
- 82, 82, 81, 81, 80, 79, 79, 78, 78, 77, 77,
- 76, 76, 75, 75, 74, 74, 73, 73, 72, 72, 71,
- 71, 70, 70, 69, 69, 69, 68, 68, 67, 67, 66,
- 66, 66, 65, 65, 64, 64, 64, 63, 63, 62, 62,
- 62, 61, 61, 61, 60, 60, 60, 59, 59, 59, 58,
- 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, 55,
- 54, 54, 54, 53, 53, 53, 53, 52, 52, 52, 51,
- 51, 51, 50, 50, 50, 50, 49, 49, 49, 49, 48,
- 48, 48, 48, 47, 47, 47, 46, 46, 46, 46, 45,
- 45, 45, 45, 44, 44, 44, 44, 44, 43, 43, 43,
- 43, 42, 42, 42, 42, 41, 41, 41, 41, 41, 40,
- 40, 40, 40, 39, 39, 39, 39, 39, 38, 38, 38,
- 38, 38, 37, 37, 37, 37, 37, 36, 36, 36, 36,
- 36, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34,
- 33, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32,
- 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30,
- 30, 29, 29, 29, 29, 29, 29, 28, 28, 28, 28,
- 28, 28, 27, 27, 27, 27, 27, 27, 26, 26, 26,
- 26, 26, 26, 26, 25, 25, 25, 25, 25, 25, 25,
- 24, 24, 24, 24, 24, 24, 23, 23, 23, 23, 23,
- 23, 23, 22, 22, 22, 22, 22, 22, 22, 21, 21,
- 21, 21, 21, 21, 21, 21, 20, 20, 20, 20, 20,
- 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 18,
- 18, 18, 18, 18, 18, 18, 18, 17, 17, 17, 17,
- 17, 17, 17, 17, 16, 16, 16, 16, 16, 16, 16,
- 16, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0
-};
-
-static const short db2lin_coeff[] = {
- 2047, 2003, 1960, 1918, 1877, 1837, 1798, 1759, 1722, 1685, 1649,
- 1614, 1579, 1546, 1513, 1480, 1449, 1418, 1387, 1358, 1329, 1300,
- 1273, 1245, 1219, 1193, 1167, 1142, 1118, 1094, 1071, 1048, 1025,
- 1004, 982, 961, 941, 920, 901, 882, 863, 844, 826, 809,
- 791, 774, 758, 742, 726, 710, 695, 680, 666, 651, 638,
- 624, 611, 598, 585, 572, 560, 548, 536, 525, 514, 503,
- 492, 481, 471, 461, 451, 442, 432, 423, 414, 405, 396,
- 388, 380, 371, 364, 356, 348, 341, 333, 326, 319, 312,
- 306, 299, 293, 287, 280, 274, 269, 263, 257, 252, 246,
- 241, 236, 231, 226, 221, 216, 212, 207, 203, 198, 194,
- 190, 186, 182, 178, 174, 170, 167, 163, 160, 156, 153,
- 150, 147, 143, 140, 137, 134, 131, 129, 126, 123, 121,
- 118, 115, 113, 111, 108, 106, 104, 101, 99, 97, 95,
- 93, 91, 89, 87, 85, 83, 82, 80, 78, 76, 75,
- 73, 72, 70, 69, 67, 66, 64, 63, 61, 60, 59,
- 58, 56, 55, 54, 53, 52, 51, 49, 48, 47, 46,
- 45, 44, 43, 42, 42, 41, 40, 39, 38, 37, 36,
- 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29,
- 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22,
- 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 18,
- 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 14,
- 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11,
- 11, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8,
- 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7,
- 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5,
- 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0
-};
-
-static const short sin_coeff[] = {
- 511, 235, 203, 185, 171, 161, 152, 145, 139, 134, 129,
- 124, 120, 117, 113, 110, 107, 104, 102, 99, 97, 95,
- 92, 90, 88, 87, 85, 83, 81, 80, 78, 77, 75,
- 74, 72, 71, 70, 69, 67, 66, 65, 64, 63, 62,
- 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52,
- 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43,
- 43, 42, 41, 41, 40, 39, 39, 38, 38, 37, 37,
- 36, 35, 35, 34, 34, 33, 33, 32, 32, 31, 31,
- 30, 30, 29, 29, 28, 28, 28, 27, 27, 26, 26,
- 25, 25, 25, 24, 24, 23, 23, 23, 22, 22, 22,
- 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18,
- 18, 17, 17, 17, 16, 16, 16, 16, 15, 15, 15,
- 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12,
- 12, 11, 11, 11, 11, 11, 10, 10, 10, 10, 9,
- 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7,
- 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5,
- 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4,
- 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
-};
-
-static const short pm0_coeff[] = {
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255,
-};
-
-static const short pm1_coeff[] = {
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
- 258, 258, 258, 258, 258, 258, 258, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
- 257, 257, 257, 257, 257, 257, 257, 257, 257, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 253,
- 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255,
-};
-
-static const short am0_coeff[] = {
- 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2,
-};
-
-static const short am1_coeff[] = {
- 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15,
- 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19,
- 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21,
- 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23,
- 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 24, 24, 24, 24, 24, 24, 24, 24, 23, 23, 23,
- 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21,
- 21, 20, 20, 20, 20, 19, 19, 19, 19, 18, 18,
- 18, 17, 17, 17, 17, 16, 16, 16, 15, 15, 15,
- 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11,
- 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8,
- 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5,
- 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2,
- 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
- 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5,
- 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8,
- 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11,
- 11, 12, 12,
-};
-
-#endif
+#ifndef _OPLTABLES_H_ +#define _OPLTABLES_H_ + +/* Precalculated emu8950 tables for use in Rockbox, + Calculated for 44Khz sampling rate */ + +static const short ar_adjust_coeff[] = { + 255, 227, 210, 198, 189, 181, 175, 170, 165, 161, 157, + 153, 150, 147, 144, 141, 139, 136, 134, 132, 130, 128, + 126, 125, 123, 121, 120, 118, 117, 115, 114, 113, 112, + 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, + 99, 98, 97, 96, 95, 94, 94, 93, 92, 91, 91, + 90, 89, 88, 88, 87, 86, 86, 85, 84, 84, 83, + 82, 82, 81, 81, 80, 79, 79, 78, 78, 77, 77, + 76, 76, 75, 75, 74, 74, 73, 73, 72, 72, 71, + 71, 70, 70, 69, 69, 69, 68, 68, 67, 67, 66, + 66, 66, 65, 65, 64, 64, 64, 63, 63, 62, 62, + 62, 61, 61, 61, 60, 60, 60, 59, 59, 59, 58, + 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, 55, + 54, 54, 54, 53, 53, 53, 53, 52, 52, 52, 51, + 51, 51, 50, 50, 50, 50, 49, 49, 49, 49, 48, + 48, 48, 48, 47, 47, 47, 46, 46, 46, 46, 45, + 45, 45, 45, 44, 44, 44, 44, 44, 43, 43, 43, + 43, 42, 42, 42, 42, 41, 41, 41, 41, 41, 40, + 40, 40, 40, 39, 39, 39, 39, 39, 38, 38, 38, + 38, 38, 37, 37, 37, 37, 37, 36, 36, 36, 36, + 36, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34, + 33, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, + 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, + 30, 29, 29, 29, 29, 29, 29, 28, 28, 28, 28, + 28, 28, 27, 27, 27, 27, 27, 27, 26, 26, 26, + 26, 26, 26, 26, 25, 25, 25, 25, 25, 25, 25, + 24, 24, 24, 24, 24, 24, 23, 23, 23, 23, 23, + 23, 23, 22, 22, 22, 22, 22, 22, 22, 21, 21, + 21, 21, 21, 21, 21, 21, 20, 20, 20, 20, 20, + 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 18, + 18, 18, 18, 18, 18, 18, 18, 17, 17, 17, 17, + 17, 17, 17, 17, 16, 16, 16, 16, 16, 16, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0 +}; + +static const short db2lin_coeff[] = { + 2047, 2003, 1960, 1918, 1877, 1837, 1798, 1759, 1722, 1685, 1649, + 1614, 1579, 1546, 1513, 1480, 1449, 1418, 1387, 1358, 1329, 1300, + 1273, 1245, 1219, 1193, 1167, 1142, 1118, 1094, 1071, 1048, 1025, + 1004, 982, 961, 941, 920, 901, 882, 863, 844, 826, 809, + 791, 774, 758, 742, 726, 710, 695, 680, 666, 651, 638, + 624, 611, 598, 585, 572, 560, 548, 536, 525, 514, 503, + 492, 481, 471, 461, 451, 442, 432, 423, 414, 405, 396, + 388, 380, 371, 364, 356, 348, 341, 333, 326, 319, 312, + 306, 299, 293, 287, 280, 274, 269, 263, 257, 252, 246, + 241, 236, 231, 226, 221, 216, 212, 207, 203, 198, 194, + 190, 186, 182, 178, 174, 170, 167, 163, 160, 156, 153, + 150, 147, 143, 140, 137, 134, 131, 129, 126, 123, 121, + 118, 115, 113, 111, 108, 106, 104, 101, 99, 97, 95, + 93, 91, 89, 87, 85, 83, 82, 80, 78, 76, 75, + 73, 72, 70, 69, 67, 66, 64, 63, 61, 60, 59, + 58, 56, 55, 54, 53, 52, 51, 49, 48, 47, 46, + 45, 44, 43, 42, 42, 41, 40, 39, 38, 37, 36, + 36, 35, 34, 33, 33, 32, 31, 31, 30, 29, 29, + 28, 27, 27, 26, 26, 25, 25, 24, 23, 23, 22, + 22, 21, 21, 21, 20, 20, 19, 19, 18, 18, 18, + 17, 17, 16, 16, 16, 15, 15, 15, 14, 14, 14, + 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, + 11, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, + 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, + 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, + 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 +}; + +static const short sin_coeff[] = { + 511, 235, 203, 185, 171, 161, 152, 145, 139, 134, 129, + 124, 120, 117, 113, 110, 107, 104, 102, 99, 97, 95, + 92, 90, 88, 87, 85, 83, 81, 80, 78, 77, 75, + 74, 72, 71, 70, 69, 67, 66, 65, 64, 63, 62, + 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, + 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, + 43, 42, 41, 41, 40, 39, 39, 38, 38, 37, 37, + 36, 35, 35, 34, 34, 33, 33, 32, 32, 31, 31, + 30, 30, 29, 29, 28, 28, 28, 27, 27, 26, 26, + 25, 25, 25, 24, 24, 23, 23, 23, 22, 22, 22, + 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18, + 18, 17, 17, 17, 16, 16, 16, 16, 15, 15, 15, + 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, + 12, 11, 11, 11, 11, 11, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, + 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, + 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, + 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const short pm0_coeff[] = { + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, +}; + +static const short pm1_coeff[] = { + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 257, + 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, + 258, 258, 258, 258, 258, 258, 258, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 257, 257, 257, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 253, + 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, + 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, +}; + +static const short am0_coeff[] = { + 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, +}; + +static const short am1_coeff[] = { + 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, + 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19, + 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, + 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, + 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 24, 24, 24, 24, 24, 24, 24, 24, 23, 23, 23, + 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21, + 21, 20, 20, 20, 20, 19, 19, 19, 19, 18, 18, + 18, 17, 17, 17, 17, 16, 16, 16, 15, 15, 15, + 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, + 11, 11, 10, 10, 10, 9, 9, 9, 9, 8, 8, + 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, + 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, + 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, + 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, + 11, 12, 12, +}; + +#endif diff --git a/apps/codecs/libgme/sgc_cpu.c b/apps/codecs/libgme/sgc_cpu.c index 3bd2d15..d23c014 100644 --- a/apps/codecs/libgme/sgc_cpu.c +++ b/apps/codecs/libgme/sgc_cpu.c @@ -1,36 +1,36 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-#include "sgc_emu.h"
-
-#include "blargg_endian.h"
-//#include "z80_cpu_log.h"
-
-/* Copyright (C) 2009 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#include "blargg_source.h"
-
-#define OUT_PORT( addr, data ) cpu_out( this, TIME(), addr, data )
-#define IN_PORT( addr ) 0 // cpu in
-#define WRITE_MEM( addr, data ) cpu_write( this, addr, data )
-#define IDLE_ADDR this->idle_addr
-#define RST_BASE this->vectors_addr
-
-#define CPU_BEGIN \
-bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time )\
-{\
- Sgc_Cpu* cpu = &this->cpu; \
- Z80_set_end_time( cpu, end_time );
-
- #include "z80_cpu_run.h"
-
- return warning;
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +#include "sgc_emu.h" + +#include "blargg_endian.h" +//#include "z80_cpu_log.h" + +/* Copyright (C) 2009 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "blargg_source.h" + +#define OUT_PORT( addr, data ) cpu_out( this, TIME(), addr, data ) +#define IN_PORT( addr ) 0 // cpu in +#define WRITE_MEM( addr, data ) cpu_write( this, addr, data ) +#define IDLE_ADDR this->idle_addr +#define RST_BASE this->vectors_addr + +#define CPU_BEGIN \ +bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time )\ +{\ + Sgc_Cpu* cpu = &this->cpu; \ + Z80_set_end_time( cpu, end_time ); + + #include "z80_cpu_run.h" + + return warning; +} diff --git a/apps/codecs/libgme/sgc_emu.c b/apps/codecs/libgme/sgc_emu.c index e7253a8..267f2c9 100644 --- a/apps/codecs/libgme/sgc_emu.c +++ b/apps/codecs/libgme/sgc_emu.c @@ -1,480 +1,480 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-#include "sgc_emu.h"
-
-/* Copyright (C) 2009 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License aint with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#include "blargg_source.h"
-
-int const osc_count = sms_osc_count + fm_apu_osc_count;
-
-const char gme_wrong_file_type [] = "Wrong file type for this emulator";
-
-static void clear_track_vars( struct Sgc_Emu* this )
-{
- this->current_track = -1;
- track_stop( &this->track_filter );
-}
-
-void Sgc_init( struct Sgc_Emu* this )
-{
- assert( offsetof (struct header_t,copyright [32]) == header_size );
-
- this->sample_rate = 0;
- this->mute_mask_ = 0;
- this->tempo = (int)FP_ONE_TEMPO;
- this->gain = (int)FP_ONE_GAIN;
-
- // defaults
- this->tfilter = *track_get_setup( &this->track_filter );
- this->tfilter.max_initial = 2;
- this->tfilter.lookahead = 6;
- this->track_filter.silence_ignored_ = false;
-
- Sms_apu_init( &this->apu );
- Fm_apu_create( &this->fm_apu );
-
- Rom_init( &this->rom, 0x4000 );
- Z80_init( &this->cpu );
-
- Sound_set_gain( this, (int)(FP_ONE_GAIN*1.2) );
-
- // Unload
- this->voice_count = 0;
- this->voice_types = 0;
- clear_track_vars( this );
-}
-
-// Setup
-
-blargg_err_t Sgc_load_mem( struct Sgc_Emu* this, const void* data, long size )
-{
- RETURN_ERR( Rom_load( &this->rom, data, size, header_size, &this->header, 0 ) );
-
- if ( !valid_tag( &this->header ) )
- return gme_wrong_file_type;
-
- /* if ( header.vers != 1 )
- warning( "Unknown file version" ); */
-
- /* if ( header.system > 2 )
- warning( "Unknown system" ); */
-
- addr_t load_addr = get_le16( this->header.load_addr );
- /* if ( load_addr < 0x400 )
- set_warning( "Invalid load address" ); */
-
- Rom_set_addr( &this->rom, load_addr );
- this->play_period = clock_rate( this ) / 60;
-
- if ( sega_mapping( this ) && Fm_apu_supported() )
- RETURN_ERR( Fm_apu_init( &this->fm_apu, clock_rate( this ), clock_rate( this ) / 72 ) );
-
- this->m3u.size = 0;
- this->track_count = this->header.song_count;
- this->voice_count = sega_mapping( this ) ? osc_count : sms_osc_count;
- static int const types [sms_osc_count + fm_apu_osc_count] = {
- wave_type+1, wave_type+2, wave_type+3, mixed_type+1, mixed_type+2
- };
- this->voice_types = types;
-
- Sms_apu_volume( &this->apu, this->gain );
- Fm_apu_volume( &this->fm_apu, this->gain );
-
- // Setup buffer
- this->clock_rate_ = clock_rate( this );
- Buffer_clock_rate( &this->stereo_buf, clock_rate( this ) );
- RETURN_ERR( Buffer_set_channel_count( &this->stereo_buf, this->voice_count, this->voice_types ) );
- this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf );
-
- Sound_set_tempo( this, this->tempo );
- Sound_mute_voices( this, this->mute_mask_ );
- return 0;
-}
-
-static void Sound_set_voice( struct Sgc_Emu* this, int i, struct Blip_Buffer* c, struct Blip_Buffer* l, struct Blip_Buffer* r )
-{
- if ( i < sms_osc_count )
- Sms_apu_set_output( &this->apu, i, c, l, r );
- else
- Fm_apu_set_output( &this->fm_apu, c );
-}
-
-static blargg_err_t run_clocks( struct Sgc_Emu* this, blip_time_t* duration, int msec )
-{
-#if defined(ROCKBOX)
- (void) msec;
-#endif
-
- cpu_time_t t = *duration;
- while ( Z80_time( &this->cpu ) < t )
- {
- cpu_time_t next = min( t, this->next_play );
- if ( run_cpu( this, next ) )
- {
- /* warning( "Unsupported CPU instruction" ); */
- Z80_set_time( &this->cpu, next );
- }
-
- if ( this->cpu.r.pc == this->idle_addr )
- Z80_set_time( &this->cpu, next );
-
- if ( Z80_time( &this->cpu ) >= this->next_play )
- {
- this->next_play += this->play_period;
- if ( this->cpu.r.pc == this->idle_addr )
- jsr( this, this->header.play_addr );
- }
- }
-
- this->next_play -= t;
- check( this->next_play >= 0 );
- Z80_adjust_time( &this->cpu, -t );
-
- Sms_apu_end_frame( &this->apu, t );
- if ( sega_mapping( this ) && this->fm_accessed )
- {
- if ( Fm_apu_supported() )
- Fm_apu_end_frame( &this->fm_apu, t );
- /* else
- warning( "FM sound not supported" ); */
- }
-
- return 0;
-}
-
-// Emulation
-
-void cpu_out( struct Sgc_Emu* this, cpu_time_t time, addr_t addr, int data )
-{
- int port = addr & 0xFF;
-
- if ( sega_mapping( this ) )
- {
- switch ( port )
- {
- case 0x06:
- Sms_apu_write_ggstereo( &this->apu, time, data );
- return;
-
- case 0x7E:
- case 0x7F:
- Sms_apu_write_data( &this->apu, time, data ); /* dprintf( "$7E<-%02X\n", data ); */
- return;
-
- case 0xF0:
- this->fm_accessed = true;
- if ( Fm_apu_supported() )
- Fm_apu_write_addr( &this->fm_apu, data );//, dprintf( "$F0<-%02X\n", data );
- return;
-
- case 0xF1:
- this->fm_accessed = true;
- if ( Fm_apu_supported() )
- Fm_apu_write_data( &this->fm_apu, time, data );//, dprintf( "$F1<-%02X\n", data );
- return;
- }
- }
- else if ( port >= 0xE0 )
- {
- Sms_apu_write_data( &this->apu, time, data );
- return;
- }
-}
-
-void jsr( struct Sgc_Emu* this, byte addr [2] )
-{
- *Z80_write( &this->cpu, --this->cpu.r.sp ) = this->idle_addr >> 8;
- *Z80_write( &this->cpu, --this->cpu.r.sp ) = this->idle_addr & 0xFF;
- this->cpu.r.pc = get_le16( addr );
-}
-
-static void set_bank( struct Sgc_Emu* this, int bank, void const* data )
-{
- //dprintf( "map bank %d to %p\n", bank, (byte*) data - rom.at_addr( 0 ) );
- Z80_map_mem( &this->cpu, bank * this->rom.bank_size, this->rom.bank_size, this->unmapped_write, data );
-}
-
-void cpu_write( struct Sgc_Emu* this, addr_t addr, int data )
-{
- if ( (addr ^ 0xFFFC) > 3 || !sega_mapping( this ) )
- {
- *Z80_write( &this->cpu, addr ) = data;
- return;
- }
-
- switch ( addr )
- {
- case 0xFFFC:
- Z80_map_mem_rw( &this->cpu, 2 * this->rom.bank_size, this->rom.bank_size, this->ram2 );
- if ( data & 0x08 )
- break;
-
- this->bank2 = this->ram2;
- // FALL THROUGH
-
- case 0xFFFF: {
- bool rom_mapped = (Z80_read( &this->cpu, 2 * this->rom.bank_size ) == this->bank2);
- this->bank2 = Rom_at_addr( &this->rom, data * this->rom.bank_size );
- if ( rom_mapped )
- set_bank( this, 2, this->bank2 );
- break;
- }
-
- case 0xFFFD:
- set_bank( this, 0, Rom_at_addr( &this->rom, data * this->rom.bank_size ) );
- break;
-
- case 0xFFFE:
- set_bank( this, 1, Rom_at_addr( &this->rom, data * this->rom.bank_size ) );
- break;
- }
-}
-
-blargg_err_t Sgc_set_sample_rate( struct Sgc_Emu* this, int rate )
-{
- require( !this->sample_rate ); // sample rate can't be changed once set
- Buffer_init( &this->stereo_buf );
- Buffer_set_sample_rate( &this->stereo_buf, rate, 1000 / 20 );
-
- // Set buffer bass
- Buffer_bass_freq( &this->stereo_buf, 80 );
-
- this->sample_rate = rate;
- RETURN_ERR( track_init( &this->track_filter, this ) );
- this->tfilter.max_silence = 6 * stereo * this->sample_rate;
- return 0;
-}
-
-void Sound_mute_voice( struct Sgc_Emu* this, int index, bool mute )
-{
- require( (unsigned) index < (unsigned) this->voice_count );
- int bit = 1 << index;
- int mask = this->mute_mask_ | bit;
- if ( !mute )
- mask ^= bit;
- Sound_mute_voices( this, mask );
-}
-
-void Sound_mute_voices( struct Sgc_Emu* this, int mask )
-{
- require( this->sample_rate ); // sample rate must be set first
- this->mute_mask_ = mask;
-
- int i;
- for ( i = this->voice_count; i--; )
- {
- if ( mask & (1 << i) )
- {
- Sound_set_voice( this, i, 0, 0, 0 );
- }
- else
- {
- struct channel_t ch = Buffer_channel( &this->stereo_buf, i );
- assert( (ch.center && ch.left && ch.right) ||
- (!ch.center && !ch.left && !ch.right) ); // all or nothing
- Sound_set_voice( this, i, ch.center, ch.left, ch.right );
- }
- }
-}
-
-void Sound_set_tempo( struct Sgc_Emu* this, int t )
-{
- require( this->sample_rate ); // sample rate must be set first
- int const min = (int)(FP_ONE_TEMPO*0.02);
- int const max = (int)(FP_ONE_TEMPO*4.00);
- if ( t < min ) t = min;
- if ( t > max ) t = max;
- this->tempo = t;
-
- this->play_period = (int) ((clock_rate( this ) * FP_ONE_TEMPO) / (this->header.rate ? 50 : 60) / t);
-}
-
-blargg_err_t Sgc_start_track( struct Sgc_Emu* this, int track )
-{
- clear_track_vars( this );
-
- // Remap track if playlist available
- if ( this->m3u.size > 0 ) {
- struct entry_t* e = &this->m3u.entries[track];
- track = e->track;
- }
-
- this->current_track = track;
-
- if ( sega_mapping( this ) )
- {
- Sms_apu_reset( &this->apu, 0, 0 );
- Fm_apu_reset( &this->fm_apu );
- this->fm_accessed = false;
- }
- else
- {
- Sms_apu_reset( &this->apu, 0x0003, 15 );
- }
-
- memset( this->ram , 0, sizeof this->ram );
- memset( this->ram2, 0, sizeof this->ram2 );
- memset( this->vectors, 0xFF, sizeof this->vectors );
- Z80_reset( &this->cpu, this->unmapped_write, this->rom.unmapped );
-
- if ( sega_mapping( this ) )
- {
- this->vectors_addr = 0x10000 - page_size;
- this->idle_addr = this->vectors_addr;
- int i;
- for ( i = 1; i < 8; ++i )
- {
- this->vectors [i*8 + 0] = 0xC3; // JP addr
- this->vectors [i*8 + 1] = this->header.rst_addrs [i - 1] & 0xff;
- this->vectors [i*8 + 2] = this->header.rst_addrs [i - 1] >> 8;
- }
-
- Z80_map_mem_rw( &this->cpu, 0xC000, 0x2000, this->ram );
- Z80_map_mem( &this->cpu, this->vectors_addr, page_size, this->unmapped_write, this->vectors );
-
- this->bank2 = NULL;
- for ( i = 0; i < 4; ++i )
- cpu_write( this, 0xFFFC + i, this->header.mapping [i] );
- }
- else
- {
- if ( !this->coleco_bios )
- return "Coleco BIOS not set"; /* BLARGG_ERR( BLARGG_ERR_CALLER, "Coleco BIOS not set" ); */
-
- this->vectors_addr = 0;
- Z80_map_mem( &this->cpu, 0, 0x2000, this->unmapped_write, this->coleco_bios );
- int i;
- for ( i = 0; i < 8; ++i )
- Z80_map_mem_rw( &this->cpu, 0x6000 + i*0x400, 0x400, this->ram );
-
- this->idle_addr = 0x2000;
- Z80_map_mem( &this->cpu, 0x2000, page_size, this->unmapped_write, this->vectors );
-
- for ( i = 0; i < 0x8000 / this->rom.bank_size; ++i )
- {
- int addr = 0x8000 + i*this->rom.bank_size;
- Z80_map_mem( &this->cpu, addr, this->rom.bank_size, this->unmapped_write, Rom_at_addr( &this->rom, addr ) );
- }
- }
-
- this->cpu.r.sp = get_le16( this->header.stack_ptr );
- this->cpu.r.b.a = track;
- this->next_play = this->play_period;
-
- jsr( this, this->header.init_addr );
-
- Buffer_clear( &this->stereo_buf );
-
- // convert filter times to samples
- struct setup_t s = this->tfilter;
- s.max_initial *= this->sample_rate * stereo;
- #ifdef GME_DISABLE_SILENCE_LOOKAHEAD
- s.lookahead = 1;
- #endif
- track_setup( &this->track_filter, &s );
-
- return track_start( &this->track_filter );
-}
-
-// Tell/Seek
-
-static int msec_to_samples( int msec, int sample_rate )
-{
- int sec = msec / 1000;
- msec -= sec * 1000;
- return (sec * sample_rate + msec * sample_rate / 1000) * stereo;
-}
-
-int Track_tell( struct Sgc_Emu* this )
-{
- int rate = this->sample_rate * stereo;
- int sec = track_sample_count( &this->track_filter ) / rate;
- return sec * 1000 + (track_sample_count( &this->track_filter ) - sec * rate) * 1000 / rate;
-}
-
-blargg_err_t Track_seek( struct Sgc_Emu* this, int msec )
-{
- int time = msec_to_samples( msec, this->sample_rate );
- if ( time < track_sample_count( &this->track_filter ) )
- RETURN_ERR( Sgc_start_track( this, this->current_track ) );
- return Track_skip( this, time - track_sample_count( &this->track_filter ) );
-}
-
-blargg_err_t Track_skip( struct Sgc_Emu* this, int count )
-{
- require( this->current_track >= 0 ); // start_track() must have been called already
- return track_skip( &this->track_filter, count );
-}
-
-blargg_err_t skip_( void* emu, int count )
-{
- struct Sgc_Emu* this = (struct Sgc_Emu*) emu;
-
- // for long skip, mute sound
- const int threshold = 32768;
- if ( count > threshold )
- {
- int saved_mute = this->mute_mask_;
- Sound_mute_voices( this, ~0 );
-
- int n = count - threshold/2;
- n &= ~(2048-1); // round to multiple of 2048
- count -= n;
- RETURN_ERR( skippy_( &this->track_filter, n ) );
-
- Sound_mute_voices( this, saved_mute );
- }
-
- return skippy_( &this->track_filter, count );
-}
-
-void Track_set_fade( struct Sgc_Emu* this, int start_msec, int length_msec )
-{
- track_set_fade( &this->track_filter, msec_to_samples( start_msec, this->sample_rate ),
- length_msec * this->sample_rate / (1000 / stereo) );
-}
-
-blargg_err_t Sgc_play( struct Sgc_Emu* this, int out_count, sample_t* out )
-{
- require( this->current_track >= 0 );
- require( out_count % stereo == 0 );
- return track_play( &this->track_filter, out_count, out );
-}
-
-blargg_err_t play_( void* emu, int count, sample_t out [] )
-{
- struct Sgc_Emu* this = (struct Sgc_Emu*) emu;
-
- int remain = count;
- while ( remain )
- {
- Buffer_disable_immediate_removal( &this->stereo_buf );
- remain -= Buffer_read_samples( &this->stereo_buf, &out [count - remain], remain );
- if ( remain )
- {
- if ( this->buf_changed_count != Buffer_channels_changed_count( &this->stereo_buf ) )
- {
- this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf );
-
- // Remute voices
- Sound_mute_voices( this, this->mute_mask_ );
- }
- int msec = Buffer_length( &this->stereo_buf );
- blip_time_t clocks_emulated = msec * this->clock_rate_ / 1000 - 100;
- RETURN_ERR( run_clocks( this, &clocks_emulated, msec ) );
- assert( clocks_emulated );
- Buffer_end_frame( &this->stereo_buf, clocks_emulated );
- }
- }
- return 0;
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +#include "sgc_emu.h" + +/* Copyright (C) 2009 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License aint with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "blargg_source.h" + +int const osc_count = sms_osc_count + fm_apu_osc_count; + +const char gme_wrong_file_type [] = "Wrong file type for this emulator"; + +static void clear_track_vars( struct Sgc_Emu* this ) +{ + this->current_track = -1; + track_stop( &this->track_filter ); +} + +void Sgc_init( struct Sgc_Emu* this ) +{ + assert( offsetof (struct header_t,copyright [32]) == header_size ); + + this->sample_rate = 0; + this->mute_mask_ = 0; + this->tempo = (int)FP_ONE_TEMPO; + this->gain = (int)FP_ONE_GAIN; + + // defaults + this->tfilter = *track_get_setup( &this->track_filter ); + this->tfilter.max_initial = 2; + this->tfilter.lookahead = 6; + this->track_filter.silence_ignored_ = false; + + Sms_apu_init( &this->apu ); + Fm_apu_create( &this->fm_apu ); + + Rom_init( &this->rom, 0x4000 ); + Z80_init( &this->cpu ); + + Sound_set_gain( this, (int)(FP_ONE_GAIN*1.2) ); + + // Unload + this->voice_count = 0; + this->voice_types = 0; + clear_track_vars( this ); +} + +// Setup + +blargg_err_t Sgc_load_mem( struct Sgc_Emu* this, const void* data, long size ) +{ + RETURN_ERR( Rom_load( &this->rom, data, size, header_size, &this->header, 0 ) ); + + if ( !valid_tag( &this->header ) ) + return gme_wrong_file_type; + + /* if ( header.vers != 1 ) + warning( "Unknown file version" ); */ + + /* if ( header.system > 2 ) + warning( "Unknown system" ); */ + + addr_t load_addr = get_le16( this->header.load_addr ); + /* if ( load_addr < 0x400 ) + set_warning( "Invalid load address" ); */ + + Rom_set_addr( &this->rom, load_addr ); + this->play_period = clock_rate( this ) / 60; + + if ( sega_mapping( this ) && Fm_apu_supported() ) + RETURN_ERR( Fm_apu_init( &this->fm_apu, clock_rate( this ), clock_rate( this ) / 72 ) ); + + this->m3u.size = 0; + this->track_count = this->header.song_count; + this->voice_count = sega_mapping( this ) ? osc_count : sms_osc_count; + static int const types [sms_osc_count + fm_apu_osc_count] = { + wave_type+1, wave_type+2, wave_type+3, mixed_type+1, mixed_type+2 + }; + this->voice_types = types; + + Sms_apu_volume( &this->apu, this->gain ); + Fm_apu_volume( &this->fm_apu, this->gain ); + + // Setup buffer + this->clock_rate_ = clock_rate( this ); + Buffer_clock_rate( &this->stereo_buf, clock_rate( this ) ); + RETURN_ERR( Buffer_set_channel_count( &this->stereo_buf, this->voice_count, this->voice_types ) ); + this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf ); + + Sound_set_tempo( this, this->tempo ); + Sound_mute_voices( this, this->mute_mask_ ); + return 0; +} + +static void Sound_set_voice( struct Sgc_Emu* this, int i, struct Blip_Buffer* c, struct Blip_Buffer* l, struct Blip_Buffer* r ) +{ + if ( i < sms_osc_count ) + Sms_apu_set_output( &this->apu, i, c, l, r ); + else + Fm_apu_set_output( &this->fm_apu, c ); +} + +static blargg_err_t run_clocks( struct Sgc_Emu* this, blip_time_t* duration, int msec ) +{ +#if defined(ROCKBOX) + (void) msec; +#endif + + cpu_time_t t = *duration; + while ( Z80_time( &this->cpu ) < t ) + { + cpu_time_t next = min( t, this->next_play ); + if ( run_cpu( this, next ) ) + { + /* warning( "Unsupported CPU instruction" ); */ + Z80_set_time( &this->cpu, next ); + } + + if ( this->cpu.r.pc == this->idle_addr ) + Z80_set_time( &this->cpu, next ); + + if ( Z80_time( &this->cpu ) >= this->next_play ) + { + this->next_play += this->play_period; + if ( this->cpu.r.pc == this->idle_addr ) + jsr( this, this->header.play_addr ); + } + } + + this->next_play -= t; + check( this->next_play >= 0 ); + Z80_adjust_time( &this->cpu, -t ); + + Sms_apu_end_frame( &this->apu, t ); + if ( sega_mapping( this ) && this->fm_accessed ) + { + if ( Fm_apu_supported() ) + Fm_apu_end_frame( &this->fm_apu, t ); + /* else + warning( "FM sound not supported" ); */ + } + + return 0; +} + +// Emulation + +void cpu_out( struct Sgc_Emu* this, cpu_time_t time, addr_t addr, int data ) +{ + int port = addr & 0xFF; + + if ( sega_mapping( this ) ) + { + switch ( port ) + { + case 0x06: + Sms_apu_write_ggstereo( &this->apu, time, data ); + return; + + case 0x7E: + case 0x7F: + Sms_apu_write_data( &this->apu, time, data ); /* dprintf( "$7E<-%02X\n", data ); */ + return; + + case 0xF0: + this->fm_accessed = true; + if ( Fm_apu_supported() ) + Fm_apu_write_addr( &this->fm_apu, data );//, dprintf( "$F0<-%02X\n", data ); + return; + + case 0xF1: + this->fm_accessed = true; + if ( Fm_apu_supported() ) + Fm_apu_write_data( &this->fm_apu, time, data );//, dprintf( "$F1<-%02X\n", data ); + return; + } + } + else if ( port >= 0xE0 ) + { + Sms_apu_write_data( &this->apu, time, data ); + return; + } +} + +void jsr( struct Sgc_Emu* this, byte addr [2] ) +{ + *Z80_write( &this->cpu, --this->cpu.r.sp ) = this->idle_addr >> 8; + *Z80_write( &this->cpu, --this->cpu.r.sp ) = this->idle_addr & 0xFF; + this->cpu.r.pc = get_le16( addr ); +} + +static void set_bank( struct Sgc_Emu* this, int bank, void const* data ) +{ + //dprintf( "map bank %d to %p\n", bank, (byte*) data - rom.at_addr( 0 ) ); + Z80_map_mem( &this->cpu, bank * this->rom.bank_size, this->rom.bank_size, this->unmapped_write, data ); +} + +void cpu_write( struct Sgc_Emu* this, addr_t addr, int data ) +{ + if ( (addr ^ 0xFFFC) > 3 || !sega_mapping( this ) ) + { + *Z80_write( &this->cpu, addr ) = data; + return; + } + + switch ( addr ) + { + case 0xFFFC: + Z80_map_mem_rw( &this->cpu, 2 * this->rom.bank_size, this->rom.bank_size, this->ram2 ); + if ( data & 0x08 ) + break; + + this->bank2 = this->ram2; + // FALL THROUGH + + case 0xFFFF: { + bool rom_mapped = (Z80_read( &this->cpu, 2 * this->rom.bank_size ) == this->bank2); + this->bank2 = Rom_at_addr( &this->rom, data * this->rom.bank_size ); + if ( rom_mapped ) + set_bank( this, 2, this->bank2 ); + break; + } + + case 0xFFFD: + set_bank( this, 0, Rom_at_addr( &this->rom, data * this->rom.bank_size ) ); + break; + + case 0xFFFE: + set_bank( this, 1, Rom_at_addr( &this->rom, data * this->rom.bank_size ) ); + break; + } +} + +blargg_err_t Sgc_set_sample_rate( struct Sgc_Emu* this, int rate ) +{ + require( !this->sample_rate ); // sample rate can't be changed once set + Buffer_init( &this->stereo_buf ); + Buffer_set_sample_rate( &this->stereo_buf, rate, 1000 / 20 ); + + // Set buffer bass + Buffer_bass_freq( &this->stereo_buf, 80 ); + + this->sample_rate = rate; + RETURN_ERR( track_init( &this->track_filter, this ) ); + this->tfilter.max_silence = 6 * stereo * this->sample_rate; + return 0; +} + +void Sound_mute_voice( struct Sgc_Emu* this, int index, bool mute ) +{ + require( (unsigned) index < (unsigned) this->voice_count ); + int bit = 1 << index; + int mask = this->mute_mask_ | bit; + if ( !mute ) + mask ^= bit; + Sound_mute_voices( this, mask ); +} + +void Sound_mute_voices( struct Sgc_Emu* this, int mask ) +{ + require( this->sample_rate ); // sample rate must be set first + this->mute_mask_ = mask; + + int i; + for ( i = this->voice_count; i--; ) + { + if ( mask & (1 << i) ) + { + Sound_set_voice( this, i, 0, 0, 0 ); + } + else + { + struct channel_t ch = Buffer_channel( &this->stereo_buf, i ); + assert( (ch.center && ch.left && ch.right) || + (!ch.center && !ch.left && !ch.right) ); // all or nothing + Sound_set_voice( this, i, ch.center, ch.left, ch.right ); + } + } +} + +void Sound_set_tempo( struct Sgc_Emu* this, int t ) +{ + require( this->sample_rate ); // sample rate must be set first + int const min = (int)(FP_ONE_TEMPO*0.02); + int const max = (int)(FP_ONE_TEMPO*4.00); + if ( t < min ) t = min; + if ( t > max ) t = max; + this->tempo = t; + + this->play_period = (int) ((clock_rate( this ) * FP_ONE_TEMPO) / (this->header.rate ? 50 : 60) / t); +} + +blargg_err_t Sgc_start_track( struct Sgc_Emu* this, int track ) +{ + clear_track_vars( this ); + + // Remap track if playlist available + if ( this->m3u.size > 0 ) { + struct entry_t* e = &this->m3u.entries[track]; + track = e->track; + } + + this->current_track = track; + + if ( sega_mapping( this ) ) + { + Sms_apu_reset( &this->apu, 0, 0 ); + Fm_apu_reset( &this->fm_apu ); + this->fm_accessed = false; + } + else + { + Sms_apu_reset( &this->apu, 0x0003, 15 ); + } + + memset( this->ram , 0, sizeof this->ram ); + memset( this->ram2, 0, sizeof this->ram2 ); + memset( this->vectors, 0xFF, sizeof this->vectors ); + Z80_reset( &this->cpu, this->unmapped_write, this->rom.unmapped ); + + if ( sega_mapping( this ) ) + { + this->vectors_addr = 0x10000 - page_size; + this->idle_addr = this->vectors_addr; + int i; + for ( i = 1; i < 8; ++i ) + { + this->vectors [i*8 + 0] = 0xC3; // JP addr + this->vectors [i*8 + 1] = this->header.rst_addrs [i - 1] & 0xff; + this->vectors [i*8 + 2] = this->header.rst_addrs [i - 1] >> 8; + } + + Z80_map_mem_rw( &this->cpu, 0xC000, 0x2000, this->ram ); + Z80_map_mem( &this->cpu, this->vectors_addr, page_size, this->unmapped_write, this->vectors ); + + this->bank2 = NULL; + for ( i = 0; i < 4; ++i ) + cpu_write( this, 0xFFFC + i, this->header.mapping [i] ); + } + else + { + if ( !this->coleco_bios ) + return "Coleco BIOS not set"; /* BLARGG_ERR( BLARGG_ERR_CALLER, "Coleco BIOS not set" ); */ + + this->vectors_addr = 0; + Z80_map_mem( &this->cpu, 0, 0x2000, this->unmapped_write, this->coleco_bios ); + int i; + for ( i = 0; i < 8; ++i ) + Z80_map_mem_rw( &this->cpu, 0x6000 + i*0x400, 0x400, this->ram ); + + this->idle_addr = 0x2000; + Z80_map_mem( &this->cpu, 0x2000, page_size, this->unmapped_write, this->vectors ); + + for ( i = 0; i < 0x8000 / this->rom.bank_size; ++i ) + { + int addr = 0x8000 + i*this->rom.bank_size; + Z80_map_mem( &this->cpu, addr, this->rom.bank_size, this->unmapped_write, Rom_at_addr( &this->rom, addr ) ); + } + } + + this->cpu.r.sp = get_le16( this->header.stack_ptr ); + this->cpu.r.b.a = track; + this->next_play = this->play_period; + + jsr( this, this->header.init_addr ); + + Buffer_clear( &this->stereo_buf ); + + // convert filter times to samples + struct setup_t s = this->tfilter; + s.max_initial *= this->sample_rate * stereo; + #ifdef GME_DISABLE_SILENCE_LOOKAHEAD + s.lookahead = 1; + #endif + track_setup( &this->track_filter, &s ); + + return track_start( &this->track_filter ); +} + +// Tell/Seek + +static int msec_to_samples( int msec, int sample_rate ) +{ + int sec = msec / 1000; + msec -= sec * 1000; + return (sec * sample_rate + msec * sample_rate / 1000) * stereo; +} + +int Track_tell( struct Sgc_Emu* this ) +{ + int rate = this->sample_rate * stereo; + int sec = track_sample_count( &this->track_filter ) / rate; + return sec * 1000 + (track_sample_count( &this->track_filter ) - sec * rate) * 1000 / rate; +} + +blargg_err_t Track_seek( struct Sgc_Emu* this, int msec ) +{ + int time = msec_to_samples( msec, this->sample_rate ); + if ( time < track_sample_count( &this->track_filter ) ) + RETURN_ERR( Sgc_start_track( this, this->current_track ) ); + return Track_skip( this, time - track_sample_count( &this->track_filter ) ); +} + +blargg_err_t Track_skip( struct Sgc_Emu* this, int count ) +{ + require( this->current_track >= 0 ); // start_track() must have been called already + return track_skip( &this->track_filter, count ); +} + +blargg_err_t skip_( void* emu, int count ) +{ + struct Sgc_Emu* this = (struct Sgc_Emu*) emu; + + // for long skip, mute sound + const int threshold = 32768; + if ( count > threshold ) + { + int saved_mute = this->mute_mask_; + Sound_mute_voices( this, ~0 ); + + int n = count - threshold/2; + n &= ~(2048-1); // round to multiple of 2048 + count -= n; + RETURN_ERR( skippy_( &this->track_filter, n ) ); + + Sound_mute_voices( this, saved_mute ); + } + + return skippy_( &this->track_filter, count ); +} + +void Track_set_fade( struct Sgc_Emu* this, int start_msec, int length_msec ) +{ + track_set_fade( &this->track_filter, msec_to_samples( start_msec, this->sample_rate ), + length_msec * this->sample_rate / (1000 / stereo) ); +} + +blargg_err_t Sgc_play( struct Sgc_Emu* this, int out_count, sample_t* out ) +{ + require( this->current_track >= 0 ); + require( out_count % stereo == 0 ); + return track_play( &this->track_filter, out_count, out ); +} + +blargg_err_t play_( void* emu, int count, sample_t out [] ) +{ + struct Sgc_Emu* this = (struct Sgc_Emu*) emu; + + int remain = count; + while ( remain ) + { + Buffer_disable_immediate_removal( &this->stereo_buf ); + remain -= Buffer_read_samples( &this->stereo_buf, &out [count - remain], remain ); + if ( remain ) + { + if ( this->buf_changed_count != Buffer_channels_changed_count( &this->stereo_buf ) ) + { + this->buf_changed_count = Buffer_channels_changed_count( &this->stereo_buf ); + + // Remute voices + Sound_mute_voices( this, this->mute_mask_ ); + } + int msec = Buffer_length( &this->stereo_buf ); + blip_time_t clocks_emulated = msec * this->clock_rate_ / 1000 - 100; + RETURN_ERR( run_clocks( this, &clocks_emulated, msec ) ); + assert( clocks_emulated ); + Buffer_end_frame( &this->stereo_buf, clocks_emulated ); + } + } + return 0; +} diff --git a/apps/codecs/libgme/sgc_emu.h b/apps/codecs/libgme/sgc_emu.h index 6595c02..83cde1e 100644 --- a/apps/codecs/libgme/sgc_emu.h +++ b/apps/codecs/libgme/sgc_emu.h @@ -1,195 +1,195 @@ -// Sega/Game Gear/Coleco SGC music file emulator
-
-// Game_Music_Emu 0.6-pre
-#ifndef SGC_EMU_H
-#define SGC_EMU_H
-
-#include "blargg_common.h"
-#include "multi_buffer.h"
-
-#include "rom_data.h"
-#include "z80_cpu.h"
-#include "sms_fm_apu.h"
-#include "sms_apu.h"
-#include "m3u_playlist.h"
-#include "track_filter.h"
-
-typedef struct Z80_Cpu Sgc_Cpu;
-
-// SGC file header
-enum { header_size = 0xA0 };
-struct header_t
-{
- char tag [4]; // "SGC\x1A"
- byte vers; // 0x01
- byte rate; // 0=NTSC 1=PAL
- byte reserved1 [2];
- byte load_addr [2];
- byte init_addr [2];
- byte play_addr [2];
- byte stack_ptr [2];
- byte reserved2 [2];
- byte rst_addrs [7*2];
- byte mapping [4]; // Used by Sega only
- byte first_song; // Song to start playing first
- byte song_count;
- byte first_effect;
- byte last_effect;
- byte system; // 0=Master System 1=Game Gear 2=Colecovision
- byte reserved3 [23];
- char game [32]; // strings can be 32 chars, NOT terminated
- char author [32];
- char copyright [32];
-};
-
-// True if header has valid file signature
-static inline bool valid_tag( struct header_t* h )
-{
- return 0 == memcmp( h->tag, "SGC\x1A", 4 );
-}
-
-static inline int effect_count( struct header_t* h ) { return h->last_effect ? h->last_effect - h->first_effect + 1 : 0; }
-
-struct Sgc_Emu {
- bool fm_accessed;
-
- cpu_time_t play_period;
- cpu_time_t next_play;
- void const* bank2; // ROM selected for bank 2, in case RAM is currently hiding it
- addr_t vectors_addr; // RST vectors start here
- addr_t idle_addr; // return address for init/play routines
- void* coleco_bios;
-
- // general
- int voice_count;
- int const* voice_types;
- int mute_mask_;
- int tempo;
- int gain;
-
- int sample_rate;
-
- // track-specific
- int current_track;
- int track_count;
-
- int clock_rate_;
- unsigned buf_changed_count;
-
- // M3u Playlist
- struct M3u_Playlist m3u;
- struct header_t header;
-
- struct setup_t tfilter;
- struct Track_Filter track_filter;
-
- struct Multi_Buffer stereo_buf;
-
- struct Sms_Apu apu;
- struct Sms_Fm_Apu fm_apu;
-
- Sgc_Cpu cpu;
-
- // large items
- struct Rom_Data rom;
- byte vectors [page_size + page_padding];
- byte unmapped_write [0x4000];
- byte ram [0x2000 + page_padding];
- byte ram2 [0x4000 + page_padding];
-};
-
-// Basic functionality (see Gme_File.h for file loading/track info functions)
-
-void Sgc_init( struct Sgc_Emu* this );
-
-blargg_err_t Sgc_load_mem( struct Sgc_Emu* this, const void* data, long size );
-
-static inline int clock_rate( struct Sgc_Emu* this ) { return this->header.rate ? 3546893 : 3579545; }
-
-// 0x2000 bytes
-static inline void set_coleco_bios( struct Sgc_Emu* this, void* p ) { this->coleco_bios = p; }
-
-// Set output sample rate. Must be called only once before loading file.
-blargg_err_t Sgc_set_sample_rate( struct Sgc_Emu* this, int sample_rate );
-
-// Start a track, where 0 is the first track. Also clears warning string.
-blargg_err_t Sgc_start_track( struct Sgc_Emu* this, int track );
-
-// Generate 'count' samples info 'buf'. Output is in stereo. Any emulation
-// errors set warning string, and major errors also end track.
-blargg_err_t Sgc_play( struct Sgc_Emu* this, int count, sample_t* buf );
-
-// Track status/control
-
-// Number of milliseconds (1000 msec = 1 second) played since beginning of track
-int Track_tell( struct Sgc_Emu* this );
-
-// Seek to new time in track. Seeking backwards or far forward can take a while.
-blargg_err_t Track_seek( struct Sgc_Emu* this, int msec );
-
-// Skip n samples
-blargg_err_t Track_skip( struct Sgc_Emu* this, int n );
-
-// Set start time and length of track fade out. Once fade ends track_ended() returns
-// true. Fade time can be changed while track is playing.
-void Track_set_fade( struct Sgc_Emu* this, int start_msec, int length_msec );
-
-// True if a track has reached its end
-static inline bool Track_ended( struct Sgc_Emu* this )
-{
- return track_ended( &this->track_filter );
-}
-
-// Disables automatic end-of-track detection and skipping of silence at beginning
-static inline void Track_ignore_silence( struct Sgc_Emu* this, bool disable )
-{
- this->track_filter.silence_ignored_ = disable;
-}
-
-// Get track length in milliseconds
-static inline int Track_get_length( struct Sgc_Emu* this, int n )
-{
- int length = 120 * 1000; /* 2 minutes */
- if ( (this->m3u.size > 0) && (n < this->m3u.size) ) {
- struct entry_t* entry = &this->m3u.entries [n];
- length = entry->length;
- }
-
- return length;
-}
-
-// Sound customization
-
-// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed.
-// Track length as returned by track_info() assumes a tempo of 1.0.
-void Sound_set_tempo( struct Sgc_Emu* this, int t );
-
-// Mute/unmute voice i, where voice 0 is first voice
-void Sound_mute_voice( struct Sgc_Emu* this, int index, bool mute );
-
-// Set muting state of all voices at once using a bit mask, where -1 mutes them all,
-// 0 unmutes them all, 0x01 mutes just the first voice, etc.
-void Sound_mute_voices( struct Sgc_Emu* this, int mask );
-
-// Change overall output amplitude, where 1.0 results in minimal clamping.
-// Must be called before set_sample_rate().
-static inline void Sound_set_gain( struct Sgc_Emu* this, int g )
-{
- assert( !this->sample_rate ); // you must set gain before setting sample rate
- this->gain = g;
-}
-
-// True if Master System or Game Gear
-static inline bool sega_mapping( struct Sgc_Emu* this )
-{
- return this->header.system <= 1;
-}
-
-// Emulation (You shouldn't touch these)
-
-bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time );
-void cpu_out( struct Sgc_Emu* this, cpu_time_t time, addr_t addr, int data );
-void cpu_write( struct Sgc_Emu* this, addr_t addr, int data );
-void jsr( struct Sgc_Emu* this, byte addr [2] );
-
-#endif
+// Sega/Game Gear/Coleco SGC music file emulator + +// Game_Music_Emu 0.6-pre +#ifndef SGC_EMU_H +#define SGC_EMU_H + +#include "blargg_common.h" +#include "multi_buffer.h" + +#include "rom_data.h" +#include "z80_cpu.h" +#include "sms_fm_apu.h" +#include "sms_apu.h" +#include "m3u_playlist.h" +#include "track_filter.h" + +typedef struct Z80_Cpu Sgc_Cpu; + +// SGC file header +enum { header_size = 0xA0 }; +struct header_t +{ + char tag [4]; // "SGC\x1A" + byte vers; // 0x01 + byte rate; // 0=NTSC 1=PAL + byte reserved1 [2]; + byte load_addr [2]; + byte init_addr [2]; + byte play_addr [2]; + byte stack_ptr [2]; + byte reserved2 [2]; + byte rst_addrs [7*2]; + byte mapping [4]; // Used by Sega only + byte first_song; // Song to start playing first + byte song_count; + byte first_effect; + byte last_effect; + byte system; // 0=Master System 1=Game Gear 2=Colecovision + byte reserved3 [23]; + char game [32]; // strings can be 32 chars, NOT terminated + char author [32]; + char copyright [32]; +}; + +// True if header has valid file signature +static inline bool valid_tag( struct header_t* h ) +{ + return 0 == memcmp( h->tag, "SGC\x1A", 4 ); +} + +static inline int effect_count( struct header_t* h ) { return h->last_effect ? h->last_effect - h->first_effect + 1 : 0; } + +struct Sgc_Emu { + bool fm_accessed; + + cpu_time_t play_period; + cpu_time_t next_play; + void const* bank2; // ROM selected for bank 2, in case RAM is currently hiding it + addr_t vectors_addr; // RST vectors start here + addr_t idle_addr; // return address for init/play routines + void* coleco_bios; + + // general + int voice_count; + int const* voice_types; + int mute_mask_; + int tempo; + int gain; + + int sample_rate; + + // track-specific + int current_track; + int track_count; + + int clock_rate_; + unsigned buf_changed_count; + + // M3u Playlist + struct M3u_Playlist m3u; + struct header_t header; + + struct setup_t tfilter; + struct Track_Filter track_filter; + + struct Multi_Buffer stereo_buf; + + struct Sms_Apu apu; + struct Sms_Fm_Apu fm_apu; + + Sgc_Cpu cpu; + + // large items + struct Rom_Data rom; + byte vectors [page_size + page_padding]; + byte unmapped_write [0x4000]; + byte ram [0x2000 + page_padding]; + byte ram2 [0x4000 + page_padding]; +}; + +// Basic functionality (see Gme_File.h for file loading/track info functions) + +void Sgc_init( struct Sgc_Emu* this ); + +blargg_err_t Sgc_load_mem( struct Sgc_Emu* this, const void* data, long size ); + +static inline int clock_rate( struct Sgc_Emu* this ) { return this->header.rate ? 3546893 : 3579545; } + +// 0x2000 bytes +static inline void set_coleco_bios( struct Sgc_Emu* this, void* p ) { this->coleco_bios = p; } + +// Set output sample rate. Must be called only once before loading file. +blargg_err_t Sgc_set_sample_rate( struct Sgc_Emu* this, int sample_rate ); + +// Start a track, where 0 is the first track. Also clears warning string. +blargg_err_t Sgc_start_track( struct Sgc_Emu* this, int track ); + +// Generate 'count' samples info 'buf'. Output is in stereo. Any emulation +// errors set warning string, and major errors also end track. +blargg_err_t Sgc_play( struct Sgc_Emu* this, int count, sample_t* buf ); + +// Track status/control + +// Number of milliseconds (1000 msec = 1 second) played since beginning of track +int Track_tell( struct Sgc_Emu* this ); + +// Seek to new time in track. Seeking backwards or far forward can take a while. +blargg_err_t Track_seek( struct Sgc_Emu* this, int msec ); + +// Skip n samples +blargg_err_t Track_skip( struct Sgc_Emu* this, int n ); + +// Set start time and length of track fade out. Once fade ends track_ended() returns +// true. Fade time can be changed while track is playing. +void Track_set_fade( struct Sgc_Emu* this, int start_msec, int length_msec ); + +// True if a track has reached its end +static inline bool Track_ended( struct Sgc_Emu* this ) +{ + return track_ended( &this->track_filter ); +} + +// Disables automatic end-of-track detection and skipping of silence at beginning +static inline void Track_ignore_silence( struct Sgc_Emu* this, bool disable ) +{ + this->track_filter.silence_ignored_ = disable; +} + +// Get track length in milliseconds +static inline int Track_get_length( struct Sgc_Emu* this, int n ) +{ + int length = 120 * 1000; /* 2 minutes */ + if ( (this->m3u.size > 0) && (n < this->m3u.size) ) { + struct entry_t* entry = &this->m3u.entries [n]; + length = entry->length; + } + + return length; +} + +// Sound customization + +// Adjust song tempo, where 1.0 = normal, 0.5 = half speed, 2.0 = double speed. +// Track length as returned by track_info() assumes a tempo of 1.0. +void Sound_set_tempo( struct Sgc_Emu* this, int t ); + +// Mute/unmute voice i, where voice 0 is first voice +void Sound_mute_voice( struct Sgc_Emu* this, int index, bool mute ); + +// Set muting state of all voices at once using a bit mask, where -1 mutes them all, +// 0 unmutes them all, 0x01 mutes just the first voice, etc. +void Sound_mute_voices( struct Sgc_Emu* this, int mask ); + +// Change overall output amplitude, where 1.0 results in minimal clamping. +// Must be called before set_sample_rate(). +static inline void Sound_set_gain( struct Sgc_Emu* this, int g ) +{ + assert( !this->sample_rate ); // you must set gain before setting sample rate + this->gain = g; +} + +// True if Master System or Game Gear +static inline bool sega_mapping( struct Sgc_Emu* this ) +{ + return this->header.system <= 1; +} + +// Emulation (You shouldn't touch these) + +bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time ); +void cpu_out( struct Sgc_Emu* this, cpu_time_t time, addr_t addr, int data ); +void cpu_write( struct Sgc_Emu* this, addr_t addr, int data ); +void jsr( struct Sgc_Emu* this, byte addr [2] ); + +#endif diff --git a/apps/codecs/libgme/sms_fm_apu.c b/apps/codecs/libgme/sms_fm_apu.c index 6fd0054..ee5ce48 100644 --- a/apps/codecs/libgme/sms_fm_apu.c +++ b/apps/codecs/libgme/sms_fm_apu.c @@ -1,82 +1,82 @@ -#include "sms_fm_apu.h"
-
-#include "blargg_source.h"
-
-void Fm_apu_create( struct Sms_Fm_Apu* this )
-{
- Synth_init( &this->synth );
- Ym2413_init( &this->apu );
-}
-
-blargg_err_t Fm_apu_init( struct Sms_Fm_Apu* this, int clock_rate, int sample_rate )
-{
- this->period_ = (blip_time_t) (clock_rate / sample_rate);
- CHECK_ALLOC( !Ym2413_set_rate( &this->apu, sample_rate, clock_rate ) );
-
- Fm_apu_set_output( this, 0 );
- Fm_apu_volume( this, (int)FP_ONE_VOLUME );
- Fm_apu_reset( this );
- return 0;
-}
-
-void Fm_apu_reset( struct Sms_Fm_Apu* this )
-{
- this->addr = 0;
- this->next_time = 0;
- this->last_amp = 0;
-
- Ym2413_reset( &this->apu );
-}
-
-void fm_run_until( struct Sms_Fm_Apu* this, blip_time_t end_time );
-void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t time, int data )
-{
- if ( time > this->next_time )
- fm_run_until( this, time );
-
- Ym2413_write( &this->apu, this->addr, data );
-}
-
-void fm_run_until( struct Sms_Fm_Apu* this, blip_time_t end_time )
-{
- assert( end_time > this->next_time );
-
- struct Blip_Buffer* const output = this->output_;
- if ( !output )
- {
- this->next_time = end_time;
- return;
- }
-
- blip_time_t time = this->next_time;
- struct Ym2413_Emu* emu = &this->apu;
- do
- {
- short samples [2];
- Ym2413_run( emu, 1, samples );
- int amp = (samples [0] + samples [1]) >> 1;
-
- int delta = amp - this->last_amp;
- if ( delta )
- {
- this->last_amp = amp;
- Synth_offset_inline( &this->synth, time, delta, output );
- }
- time += this->period_;
- }
- while ( time < end_time );
-
- this->next_time = time;
-}
-
-void Fm_apu_end_frame( struct Sms_Fm_Apu* this, blip_time_t time )
-{
- if ( time > this->next_time )
- fm_run_until( this, time );
-
- this->next_time -= time;
- assert( this->next_time >= 0 );
-
- if ( this->output_ )
- Blip_set_modified( this->output_ );
-}
+#include "sms_fm_apu.h" + +#include "blargg_source.h" + +void Fm_apu_create( struct Sms_Fm_Apu* this ) +{ + Synth_init( &this->synth ); + Ym2413_init( &this->apu ); +} + +blargg_err_t Fm_apu_init( struct Sms_Fm_Apu* this, int clock_rate, int sample_rate ) +{ + this->period_ = (blip_time_t) (clock_rate / sample_rate); + CHECK_ALLOC( !Ym2413_set_rate( &this->apu, sample_rate, clock_rate ) ); + + Fm_apu_set_output( this, 0 ); + Fm_apu_volume( this, (int)FP_ONE_VOLUME ); + Fm_apu_reset( this ); + return 0; +} + +void Fm_apu_reset( struct Sms_Fm_Apu* this ) +{ + this->addr = 0; + this->next_time = 0; + this->last_amp = 0; + + Ym2413_reset( &this->apu ); +} + +void fm_run_until( struct Sms_Fm_Apu* this, blip_time_t end_time ); +void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t time, int data ) +{ + if ( time > this->next_time ) + fm_run_until( this, time ); + + Ym2413_write( &this->apu, this->addr, data ); +} + +void fm_run_until( struct Sms_Fm_Apu* this, blip_time_t end_time ) +{ + assert( end_time > this->next_time ); + + struct Blip_Buffer* const output = this->output_; + if ( !output ) + { + this->next_time = end_time; + return; + } + + blip_time_t time = this->next_time; + struct Ym2413_Emu* emu = &this->apu; + do + { + short samples [2]; + Ym2413_run( emu, 1, samples ); + int amp = (samples [0] + samples [1]) >> 1; + + int delta = amp - this->last_amp; + if ( delta ) + { + this->last_amp = amp; + Synth_offset_inline( &this->synth, time, delta, output ); + } + time += this->period_; + } + while ( time < end_time ); + + this->next_time = time; +} + +void Fm_apu_end_frame( struct Sms_Fm_Apu* this, blip_time_t time ) +{ + if ( time > this->next_time ) + fm_run_until( this, time ); + + this->next_time -= time; + assert( this->next_time >= 0 ); + + if ( this->output_ ) + Blip_set_modified( this->output_ ); +} diff --git a/apps/codecs/libgme/sms_fm_apu.h b/apps/codecs/libgme/sms_fm_apu.h index 00bc2b4..921db6c 100644 --- a/apps/codecs/libgme/sms_fm_apu.h +++ b/apps/codecs/libgme/sms_fm_apu.h @@ -1,43 +1,43 @@ -#ifndef SMS_FM_APU_H
-#define SMS_FM_APU_H
-
-#include "blargg_common.h"
-#include "blip_buffer.h"
-#include "ym2413_emu.h"
-
-enum { fm_apu_osc_count = 1 };
-
-struct Sms_Fm_Apu {
- struct Blip_Buffer* output_;
- blip_time_t next_time;
- int last_amp;
- int addr;
-
- int clock_;
- int rate_;
- blip_time_t period_;
-
- struct Blip_Synth synth;
- struct Ym2413_Emu apu;
-};
-
-void Fm_apu_create( struct Sms_Fm_Apu* this );
-
-static inline bool Fm_apu_supported( void ) { return Ym2413_supported(); }
-blargg_err_t Fm_apu_init( struct Sms_Fm_Apu* this, int clock_rate, int sample_rate );
-
-static inline void Fm_apu_set_output( struct Sms_Fm_Apu* this, struct Blip_Buffer* b )
-{
- this->output_ = b;
-}
-
-static inline void Fm_apu_volume( struct Sms_Fm_Apu* this, int v ) { Synth_volume( &this->synth, (v*2) / 5 / 4096 ); }
-
-void Fm_apu_reset( struct Sms_Fm_Apu* this );
-
-static inline void Fm_apu_write_addr( struct Sms_Fm_Apu* this, int data ) { this->addr = data; }
-void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t, int data );
-
-void Fm_apu_end_frame( struct Sms_Fm_Apu* this, blip_time_t t );
-
-#endif
+#ifndef SMS_FM_APU_H +#define SMS_FM_APU_H + +#include "blargg_common.h" +#include "blip_buffer.h" +#include "ym2413_emu.h" + +enum { fm_apu_osc_count = 1 }; + +struct Sms_Fm_Apu { + struct Blip_Buffer* output_; + blip_time_t next_time; + int last_amp; + int addr; + + int clock_; + int rate_; + blip_time_t period_; + + struct Blip_Synth synth; + struct Ym2413_Emu apu; +}; + +void Fm_apu_create( struct Sms_Fm_Apu* this ); + +static inline bool Fm_apu_supported( void ) { return Ym2413_supported(); } +blargg_err_t Fm_apu_init( struct Sms_Fm_Apu* this, int clock_rate, int sample_rate ); + +static inline void Fm_apu_set_output( struct Sms_Fm_Apu* this, struct Blip_Buffer* b ) +{ + this->output_ = b; +} + +static inline void Fm_apu_volume( struct Sms_Fm_Apu* this, int v ) { Synth_volume( &this->synth, (v*2) / 5 / 4096 ); } + +void Fm_apu_reset( struct Sms_Fm_Apu* this ); + +static inline void Fm_apu_write_addr( struct Sms_Fm_Apu* this, int data ) { this->addr = data; } +void Fm_apu_write_data( struct Sms_Fm_Apu* this, blip_time_t, int data ); + +void Fm_apu_end_frame( struct Sms_Fm_Apu* this, blip_time_t t ); + +#endif diff --git a/apps/codecs/libgme/track_filter.c b/apps/codecs/libgme/track_filter.c index 4776dcc..d0d75f2 100644 --- a/apps/codecs/libgme/track_filter.c +++ b/apps/codecs/libgme/track_filter.c @@ -1,294 +1,294 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-#include "track_filter.h"
-
-/* Copyright (C) 2003-2008 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#include "blargg_source.h"
-
-int const fade_block_size = 512;
-int const fade_shift = 8; // fade ends with gain at 1.0 / (1 << fade_shift)
-int const silence_threshold = 8;
-
-void track_create( struct Track_Filter* this )
-{
- this->emu_ = NULL;
- this->setup_.max_initial = 0;
- this->setup_.lookahead = 0;
- this->setup_.max_silence = indefinite_count;
- this->silence_ignored_ = false;
- track_stop( this );
-}
-
-blargg_err_t track_init( struct Track_Filter* this, void* emu )
-{
- this->emu_ = emu;
- return 0;
-}
-
-static void clear_time_vars( struct Track_Filter* this )
-{
- this->emu_time = this->buf_remain;
- this->out_time = 0;
- this->silence_time = 0;
- this->silence_count = 0;
-}
-
-void track_stop( struct Track_Filter* this )
-{
- this->emu_track_ended_ = true;
- this->track_ended_ = true;
- this->fade_start = indefinite_count;
- this->fade_step = 1;
- this->buf_remain = 0;
- this->emu_error = NULL;
- clear_time_vars( this );
-}
-
-blargg_err_t track_start( struct Track_Filter* this )
-{
- this->emu_error = NULL;
- track_stop( this );
-
- this->emu_track_ended_ = false;
- this->track_ended_ = false;
-
- if ( !this->silence_ignored_ )
- {
- // play until non-silence or end of track
- while ( this->emu_time < this->setup_.max_initial )
- {
- fill_buf( this );
- if ( this->buf_remain | this->emu_track_ended_ )
- break;
- }
- }
-
- clear_time_vars( this );
- return this->emu_error;
-}
-
-static void end_track_if_error( struct Track_Filter* this, blargg_err_t err )
-{
- if ( err )
- {
- this->emu_error = err;
- this->emu_track_ended_ = true;
- }
-}
-
-blargg_err_t track_skip( struct Track_Filter* this, int count )
-{
- this->emu_error = NULL;
- this->out_time += count;
-
- // remove from silence and buf first
- {
- int n = min( count, this->silence_count );
- this->silence_count -= n;
- count -= n;
-
- n = min( count, this->buf_remain );
- this->buf_remain -= n;
- count -= n;
- }
-
- if ( count && !this->emu_track_ended_ )
- {
- this->emu_time += count;
- this->silence_time = this->emu_time; // would otherwise be invalid
- end_track_if_error( this, skip_( this->emu_, count ) );
- }
-
- if ( !(this->silence_count | this->buf_remain) ) // caught up to emulator, so update track ended
- this->track_ended_ |= this->emu_track_ended_;
-
- return this->emu_error;
-}
-
-blargg_err_t skippy_( struct Track_Filter* this, int count )
-{
- while ( count && !this->emu_track_ended_ )
- {
- int n = buf_size;
- if ( n > count )
- n = count;
- count -= n;
- RETURN_ERR( play_( this->emu_, n, this->buf ) );
- }
- return 0;
-}
-
-// Fading
-
-void track_set_fade( struct Track_Filter* this, int start, int length )
-{
- this->fade_start = start;
- this->fade_step = length / (fade_block_size * fade_shift);
- if ( this->fade_step < 1 )
- this->fade_step = 1;
-}
-
-static bool is_fading( struct Track_Filter* this )
-{
- return this->out_time >= this->fade_start && this->fade_start != indefinite_count;
-}
-
-// unit / pow( 2.0, (double) x / step )
-static int int_log( int x, int step, int unit )
-{
- int shift = x / step;
- int fraction = (x - shift * step) * unit / step;
- return ((unit - fraction) + (fraction >> 1)) >> shift;
-}
-
-static void handle_fade( struct Track_Filter* this, sample_t out [], int out_count )
-{
- int i;
- for ( i = 0; i < out_count; i += fade_block_size )
- {
- int const shift = 14;
- int const unit = 1 << shift;
- int gain = int_log( (this->out_time + i - this->fade_start) / fade_block_size,
- this->fade_step, unit );
- if ( gain < (unit >> fade_shift) )
- this->track_ended_ = this->emu_track_ended_ = true;
-
- sample_t* io = &out [i];
- for ( int count = min( fade_block_size, out_count - i ); count; --count )
- {
- *io = (sample_t) ((*io * gain) >> shift);
- ++io;
- }
- }
-}
-
-// Silence detection
-
-static void emu_play( struct Track_Filter* this, sample_t out [], int count )
-{
- this->emu_time += count;
- if ( !this->emu_track_ended_ )
- end_track_if_error( this, play_( this->emu_, count, out ) );
- else
- memset( out, 0, count * sizeof *out );
-}
-
-// number of consecutive silent samples at end
-static int count_silence( sample_t begin [], int size )
-{
- sample_t first = *begin;
- *begin = silence_threshold * 2; // sentinel
- sample_t* p = begin + size;
- while ( (unsigned) (*--p + silence_threshold) <= (unsigned) silence_threshold * 2 ) { }
- *begin = first;
- return size - (p - begin);
-}
-
-// fill internal buffer and check it for silence
-void fill_buf( struct Track_Filter* this )
-{
- assert( !this->buf_remain );
- if ( !this->emu_track_ended_ )
- {
- emu_play( this, this->buf, buf_size );
- int silence = count_silence( this->buf, buf_size );
- if ( silence < buf_size )
- {
- this->silence_time = this->emu_time - silence;
- this->buf_remain = buf_size;
- return;
- }
- }
- this->silence_count += buf_size;
-}
-
-blargg_err_t track_play( struct Track_Filter* this, int out_count, sample_t out [] )
-{
- this->emu_error = NULL;
- if ( this->track_ended_ )
- {
- memset( out, 0, out_count * sizeof *out );
- }
- else
- {
- assert( this->emu_time >= this->out_time );
-
- // prints nifty graph of how far ahead we are when searching for silence
- //dprintf( "%*s \n", int ((emu_time - out_time) * 7 / 44100), "*" );
-
- // use any remaining silence samples
- int pos = 0;
- if ( this->silence_count )
- {
- if ( !this->silence_ignored_ )
- {
- // during a run of silence, run emulator at >=2x speed so it gets ahead
- int ahead_time = this->setup_.lookahead * (this->out_time + out_count - this->silence_time) +
- this->silence_time;
- while ( this->emu_time < ahead_time && !(this->buf_remain | this->emu_track_ended_) )
- fill_buf( this );
-
- // end track if sufficient silence has been found
- if ( this->emu_time - this->silence_time > this->setup_.max_silence )
- {
- this->track_ended_ = this->emu_track_ended_ = true;
- this->silence_count = out_count;
- this->buf_remain = 0;
- }
- }
-
- // fill from remaining silence
- pos = min( this->silence_count, out_count );
- memset( out, 0, pos * sizeof *out );
- this->silence_count -= pos;
- }
-
- // use any remaining samples from buffer
- if ( this->buf_remain )
- {
- int n = min( this->buf_remain, (int) (out_count - pos) );
- memcpy( out + pos, this->buf + (buf_size - this->buf_remain), n * sizeof *out );
- this->buf_remain -= n;
- pos += n;
- }
-
- // generate remaining samples normally
- int remain = out_count - pos;
- if ( remain )
- {
- emu_play( this, out + pos, remain );
- this->track_ended_ |= this->emu_track_ended_;
-
- if ( this->silence_ignored_ && !is_fading( this ) )
- {
- // if left unupdated, ahead_time could become too large
- this->silence_time = this->emu_time;
- }
- else
- {
- // check end for a new run of silence
- int silence = count_silence( out + pos, remain );
- if ( silence < remain )
- this->silence_time = this->emu_time - silence;
-
- if ( this->emu_time - this->silence_time >= buf_size )
- fill_buf( this ); // cause silence detection on next play()
- }
- }
-
- if ( is_fading( this ) )
- handle_fade( this, out, out_count );
- }
- this->out_time += out_count;
- return this->emu_error;
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +#include "track_filter.h" + +/* Copyright (C) 2003-2008 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "blargg_source.h" + +int const fade_block_size = 512; +int const fade_shift = 8; // fade ends with gain at 1.0 / (1 << fade_shift) +int const silence_threshold = 8; + +void track_create( struct Track_Filter* this ) +{ + this->emu_ = NULL; + this->setup_.max_initial = 0; + this->setup_.lookahead = 0; + this->setup_.max_silence = indefinite_count; + this->silence_ignored_ = false; + track_stop( this ); +} + +blargg_err_t track_init( struct Track_Filter* this, void* emu ) +{ + this->emu_ = emu; + return 0; +} + +static void clear_time_vars( struct Track_Filter* this ) +{ + this->emu_time = this->buf_remain; + this->out_time = 0; + this->silence_time = 0; + this->silence_count = 0; +} + +void track_stop( struct Track_Filter* this ) +{ + this->emu_track_ended_ = true; + this->track_ended_ = true; + this->fade_start = indefinite_count; + this->fade_step = 1; + this->buf_remain = 0; + this->emu_error = NULL; + clear_time_vars( this ); +} + +blargg_err_t track_start( struct Track_Filter* this ) +{ + this->emu_error = NULL; + track_stop( this ); + + this->emu_track_ended_ = false; + this->track_ended_ = false; + + if ( !this->silence_ignored_ ) + { + // play until non-silence or end of track + while ( this->emu_time < this->setup_.max_initial ) + { + fill_buf( this ); + if ( this->buf_remain | this->emu_track_ended_ ) + break; + } + } + + clear_time_vars( this ); + return this->emu_error; +} + +static void end_track_if_error( struct Track_Filter* this, blargg_err_t err ) +{ + if ( err ) + { + this->emu_error = err; + this->emu_track_ended_ = true; + } +} + +blargg_err_t track_skip( struct Track_Filter* this, int count ) +{ + this->emu_error = NULL; + this->out_time += count; + + // remove from silence and buf first + { + int n = min( count, this->silence_count ); + this->silence_count -= n; + count -= n; + + n = min( count, this->buf_remain ); + this->buf_remain -= n; + count -= n; + } + + if ( count && !this->emu_track_ended_ ) + { + this->emu_time += count; + this->silence_time = this->emu_time; // would otherwise be invalid + end_track_if_error( this, skip_( this->emu_, count ) ); + } + + if ( !(this->silence_count | this->buf_remain) ) // caught up to emulator, so update track ended + this->track_ended_ |= this->emu_track_ended_; + + return this->emu_error; +} + +blargg_err_t skippy_( struct Track_Filter* this, int count ) +{ + while ( count && !this->emu_track_ended_ ) + { + int n = buf_size; + if ( n > count ) + n = count; + count -= n; + RETURN_ERR( play_( this->emu_, n, this->buf ) ); + } + return 0; +} + +// Fading + +void track_set_fade( struct Track_Filter* this, int start, int length ) +{ + this->fade_start = start; + this->fade_step = length / (fade_block_size * fade_shift); + if ( this->fade_step < 1 ) + this->fade_step = 1; +} + +static bool is_fading( struct Track_Filter* this ) +{ + return this->out_time >= this->fade_start && this->fade_start != indefinite_count; +} + +// unit / pow( 2.0, (double) x / step ) +static int int_log( int x, int step, int unit ) +{ + int shift = x / step; + int fraction = (x - shift * step) * unit / step; + return ((unit - fraction) + (fraction >> 1)) >> shift; +} + +static void handle_fade( struct Track_Filter* this, sample_t out [], int out_count ) +{ + int i; + for ( i = 0; i < out_count; i += fade_block_size ) + { + int const shift = 14; + int const unit = 1 << shift; + int gain = int_log( (this->out_time + i - this->fade_start) / fade_block_size, + this->fade_step, unit ); + if ( gain < (unit >> fade_shift) ) + this->track_ended_ = this->emu_track_ended_ = true; + + sample_t* io = &out [i]; + for ( int count = min( fade_block_size, out_count - i ); count; --count ) + { + *io = (sample_t) ((*io * gain) >> shift); + ++io; + } + } +} + +// Silence detection + +static void emu_play( struct Track_Filter* this, sample_t out [], int count ) +{ + this->emu_time += count; + if ( !this->emu_track_ended_ ) + end_track_if_error( this, play_( this->emu_, count, out ) ); + else + memset( out, 0, count * sizeof *out ); +} + +// number of consecutive silent samples at end +static int count_silence( sample_t begin [], int size ) +{ + sample_t first = *begin; + *begin = silence_threshold * 2; // sentinel + sample_t* p = begin + size; + while ( (unsigned) (*--p + silence_threshold) <= (unsigned) silence_threshold * 2 ) { } + *begin = first; + return size - (p - begin); +} + +// fill internal buffer and check it for silence +void fill_buf( struct Track_Filter* this ) +{ + assert( !this->buf_remain ); + if ( !this->emu_track_ended_ ) + { + emu_play( this, this->buf, buf_size ); + int silence = count_silence( this->buf, buf_size ); + if ( silence < buf_size ) + { + this->silence_time = this->emu_time - silence; + this->buf_remain = buf_size; + return; + } + } + this->silence_count += buf_size; +} + +blargg_err_t track_play( struct Track_Filter* this, int out_count, sample_t out [] ) +{ + this->emu_error = NULL; + if ( this->track_ended_ ) + { + memset( out, 0, out_count * sizeof *out ); + } + else + { + assert( this->emu_time >= this->out_time ); + + // prints nifty graph of how far ahead we are when searching for silence + //dprintf( "%*s \n", int ((emu_time - out_time) * 7 / 44100), "*" ); + + // use any remaining silence samples + int pos = 0; + if ( this->silence_count ) + { + if ( !this->silence_ignored_ ) + { + // during a run of silence, run emulator at >=2x speed so it gets ahead + int ahead_time = this->setup_.lookahead * (this->out_time + out_count - this->silence_time) + + this->silence_time; + while ( this->emu_time < ahead_time && !(this->buf_remain | this->emu_track_ended_) ) + fill_buf( this ); + + // end track if sufficient silence has been found + if ( this->emu_time - this->silence_time > this->setup_.max_silence ) + { + this->track_ended_ = this->emu_track_ended_ = true; + this->silence_count = out_count; + this->buf_remain = 0; + } + } + + // fill from remaining silence + pos = min( this->silence_count, out_count ); + memset( out, 0, pos * sizeof *out ); + this->silence_count -= pos; + } + + // use any remaining samples from buffer + if ( this->buf_remain ) + { + int n = min( this->buf_remain, (int) (out_count - pos) ); + memcpy( out + pos, this->buf + (buf_size - this->buf_remain), n * sizeof *out ); + this->buf_remain -= n; + pos += n; + } + + // generate remaining samples normally + int remain = out_count - pos; + if ( remain ) + { + emu_play( this, out + pos, remain ); + this->track_ended_ |= this->emu_track_ended_; + + if ( this->silence_ignored_ && !is_fading( this ) ) + { + // if left unupdated, ahead_time could become too large + this->silence_time = this->emu_time; + } + else + { + // check end for a new run of silence + int silence = count_silence( out + pos, remain ); + if ( silence < remain ) + this->silence_time = this->emu_time - silence; + + if ( this->emu_time - this->silence_time >= buf_size ) + fill_buf( this ); // cause silence detection on next play() + } + } + + if ( is_fading( this ) ) + handle_fade( this, out, out_count ); + } + this->out_time += out_count; + return this->emu_error; +} diff --git a/apps/codecs/libgme/track_filter.h b/apps/codecs/libgme/track_filter.h index 35049b9..3689be9 100644 --- a/apps/codecs/libgme/track_filter.h +++ b/apps/codecs/libgme/track_filter.h @@ -1,90 +1,90 @@ -// Removes silence from beginning of track, fades end of track. Also looks ahead
-// for excessive silence, and if found, ends track.
-
-// Game_Music_Emu 0.6-pre
-#ifndef TRACK_FILTER_H
-#define TRACK_FILTER_H
-
-#include "blargg_common.h"
-
-typedef short sample_t;
-typedef int sample_count_t;
-
-enum { indefinite_count = INT_MAX/2 + 1 };
-enum { buf_size = 2048 };
-
-struct setup_t {
- sample_count_t max_initial; // maximum silence to strip from beginning of track
- sample_count_t max_silence; // maximum silence in middle of track without it ending
- int lookahead; // internal speed when looking ahead for silence (2=200% etc.)
-};
-
-struct Track_Filter {
- void* emu_;
- struct setup_t setup_;
- const char* emu_error;
- bool silence_ignored_;
-
- // Timing
- int out_time; // number of samples played since start of track
- int emu_time; // number of samples emulator has generated since start of track
- int emu_track_ended_; // emulator has reached end of track
- volatile int track_ended_;
-
- // Fading
- int fade_start;
- int fade_step;
-
- // Silence detection
- int silence_time; // absolute number of samples where most recent silence began
- int silence_count; // number of samples of silence to play before using buf
- int buf_remain; // number of samples left in silence buffer
- sample_t buf [buf_size];
-};
-
-// Initializes filter. Must be done once before using object.
-blargg_err_t track_init( struct Track_Filter* this, void* );
-void track_create( struct Track_Filter* this );
-
-// Gets/sets setup
-static inline struct setup_t const* track_get_setup( struct Track_Filter* this ) { return &this->setup_; }
-static inline void track_setup( struct Track_Filter* this, struct setup_t const* s ) { this->setup_ = *s; }
-
-// Disables automatic end-of-track detection and skipping of silence at beginning
-static inline void track_ignore_silence( struct Track_Filter* this, bool disable ) { this->silence_ignored_ = disable; }
-
-// Clears state and skips initial silence in track
-blargg_err_t track_start( struct Track_Filter* this );
-
-// Sets time that fade starts, and how long until track ends.
-void track_set_fade( struct Track_Filter* this, sample_count_t start, sample_count_t length );
-
-// Generates n samples into buf
-blargg_err_t track_play( struct Track_Filter* this, int n, sample_t buf [] );
-
-// Skips n samples
-blargg_err_t track_skip( struct Track_Filter* this, int n );
-
-// Number of samples played/skipped since start_track()
-static inline int track_sample_count( struct Track_Filter* this ) { return this->out_time; }
-
-// True if track ended. Causes are end of source samples, end of fade,
-// or excessive silence.
-static inline bool track_ended( struct Track_Filter* this ) { return this->track_ended_; }
-
-// Clears state
-void track_stop( struct Track_Filter* this );
-
-// For use by callbacks
-
-// Sets internal "track ended" flag and stops generation of further source samples
-static inline void track_set_end( struct Track_Filter* this ) { this->emu_track_ended_ = true; }
-
-// For use by skip_() callback
-blargg_err_t skippy_( struct Track_Filter* this, int count );
-void fill_buf( struct Track_Filter* this );
-
-// Skip and play callbacks
-blargg_err_t skip_( void* emu, int count );
-blargg_err_t play_( void* emu, int count, sample_t out [] );
-#endif
+// Removes silence from beginning of track, fades end of track. Also looks ahead +// for excessive silence, and if found, ends track. + +// Game_Music_Emu 0.6-pre +#ifndef TRACK_FILTER_H +#define TRACK_FILTER_H + +#include "blargg_common.h" + +typedef short sample_t; +typedef int sample_count_t; + +enum { indefinite_count = INT_MAX/2 + 1 }; +enum { buf_size = 2048 }; + +struct setup_t { + sample_count_t max_initial; // maximum silence to strip from beginning of track + sample_count_t max_silence; // maximum silence in middle of track without it ending + int lookahead; // internal speed when looking ahead for silence (2=200% etc.) +}; + +struct Track_Filter { + void* emu_; + struct setup_t setup_; + const char* emu_error; + bool silence_ignored_; + + // Timing + int out_time; // number of samples played since start of track + int emu_time; // number of samples emulator has generated since start of track + int emu_track_ended_; // emulator has reached end of track + volatile int track_ended_; + + // Fading + int fade_start; + int fade_step; + + // Silence detection + int silence_time; // absolute number of samples where most recent silence began + int silence_count; // number of samples of silence to play before using buf + int buf_remain; // number of samples left in silence buffer + sample_t buf [buf_size]; +}; + +// Initializes filter. Must be done once before using object. +blargg_err_t track_init( struct Track_Filter* this, void* ); +void track_create( struct Track_Filter* this ); + +// Gets/sets setup +static inline struct setup_t const* track_get_setup( struct Track_Filter* this ) { return &this->setup_; } +static inline void track_setup( struct Track_Filter* this, struct setup_t const* s ) { this->setup_ = *s; } + +// Disables automatic end-of-track detection and skipping of silence at beginning +static inline void track_ignore_silence( struct Track_Filter* this, bool disable ) { this->silence_ignored_ = disable; } + +// Clears state and skips initial silence in track +blargg_err_t track_start( struct Track_Filter* this ); + +// Sets time that fade starts, and how long until track ends. +void track_set_fade( struct Track_Filter* this, sample_count_t start, sample_count_t length ); + +// Generates n samples into buf +blargg_err_t track_play( struct Track_Filter* this, int n, sample_t buf [] ); + +// Skips n samples +blargg_err_t track_skip( struct Track_Filter* this, int n ); + +// Number of samples played/skipped since start_track() +static inline int track_sample_count( struct Track_Filter* this ) { return this->out_time; } + +// True if track ended. Causes are end of source samples, end of fade, +// or excessive silence. +static inline bool track_ended( struct Track_Filter* this ) { return this->track_ended_; } + +// Clears state +void track_stop( struct Track_Filter* this ); + +// For use by callbacks + +// Sets internal "track ended" flag and stops generation of further source samples +static inline void track_set_end( struct Track_Filter* this ) { this->emu_track_ended_ = true; } + +// For use by skip_() callback +blargg_err_t skippy_( struct Track_Filter* this, int count ); +void fill_buf( struct Track_Filter* this ); + +// Skip and play callbacks +blargg_err_t skip_( void* emu, int count ); +blargg_err_t play_( void* emu, int count, sample_t out [] ); +#endif diff --git a/apps/codecs/libgme/vrc7tone.h b/apps/codecs/libgme/vrc7tone.h index a256c80..c589335 100644 --- a/apps/codecs/libgme/vrc7tone.h +++ b/apps/codecs/libgme/vrc7tone.h @@ -1,20 +1,20 @@ -/* VRC7 TONES by okazaki@angel.ne.jp */
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x33,0x01,0x09,0x0e,0x94,0x90,0x40,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x13,0x41,0x0f,0x0d,0xce,0xd3,0x43,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x12,0x1b,0x06,0xff,0xd2,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x61,0x61,0x1b,0x07,0xaf,0x63,0x20,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x22,0x21,0x1e,0x06,0xf0,0x76,0x08,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x66,0x21,0x15,0x00,0x93,0x94,0x20,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x61,0x1c,0x07,0x82,0x81,0x10,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x23,0x21,0x20,0x1f,0xc0,0x71,0x07,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x25,0x31,0x26,0x05,0x64,0x41,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x17,0x21,0x28,0x07,0xff,0x83,0x02,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x97,0x81,0x25,0x07,0xcf,0xc8,0x02,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x21,0x54,0x0f,0x80,0x7f,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x01,0x56,0x03,0xd3,0xb2,0x43,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x31,0x21,0x0c,0x03,0x82,0xc0,0x40,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x21,0x01,0x0c,0x03,0xd4,0xd3,0x40,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+/* VRC7 TONES by okazaki@angel.ne.jp */ +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x33,0x01,0x09,0x0e,0x94,0x90,0x40,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x13,0x41,0x0f,0x0d,0xce,0xd3,0x43,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x12,0x1b,0x06,0xff,0xd2,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x61,0x61,0x1b,0x07,0xaf,0x63,0x20,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x22,0x21,0x1e,0x06,0xf0,0x76,0x08,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x66,0x21,0x15,0x00,0x93,0x94,0x20,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x61,0x1c,0x07,0x82,0x81,0x10,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x23,0x21,0x20,0x1f,0xc0,0x71,0x07,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x25,0x31,0x26,0x05,0x64,0x41,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x17,0x21,0x28,0x07,0xff,0x83,0x02,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x97,0x81,0x25,0x07,0xcf,0xc8,0x02,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x21,0x54,0x0f,0x80,0x7f,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x01,0x56,0x03,0xd3,0xb2,0x43,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x31,0x21,0x0c,0x03,0x82,0xc0,0x40,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x21,0x01,0x0c,0x03,0xd4,0xd3,0x40,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 diff --git a/apps/codecs/libgme/ym2413_emu.c b/apps/codecs/libgme/ym2413_emu.c index 9efd3dc..d9ada43 100644 --- a/apps/codecs/libgme/ym2413_emu.c +++ b/apps/codecs/libgme/ym2413_emu.c @@ -1,45 +1,45 @@ -// Game_Music_Emu 0.5.5. http://www.slack.net/~ant/
-
-#include "ym2413_emu.h"
-
-void Ym2413_init( struct Ym2413_Emu* this )
-{
- this->last_time = disabled_time; this->out = 0;
-}
-
-int Ym2413_set_rate( struct Ym2413_Emu* this, int sample_rate, int clock_rate )
-{
- OPLL_new ( &this->opll, clock_rate, sample_rate );
- OPLL_reset_patch( &this->opll, OPLL_2413_TONE );
-
- Ym2413_reset( this );
- return 0;
-}
-
-void Ym2413_reset( struct Ym2413_Emu* this )
-{
- OPLL_reset( &this->opll );
- OPLL_setMask( &this->opll, 0 );
-}
-
-void Ym2413_write( struct Ym2413_Emu* this, int addr, int data )
-{
- OPLL_writeIO( &this->opll, 0, addr );
- OPLL_writeIO( &this->opll, 1, data );
-}
-
-void Ym2413_mute_voices( struct Ym2413_Emu* this, int mask )
-{
- OPLL_setMask( &this->opll, mask );
-}
-
-void Ym2413_run( struct Ym2413_Emu* this, int pair_count, short* out )
-{
- while ( pair_count-- )
- {
- int s = OPLL_calc( &this->opll ) << 1;
- out [0] = s;
- out [1] = s;
- out += 2;
- }
-}
+// Game_Music_Emu 0.5.5. http://www.slack.net/~ant/ + +#include "ym2413_emu.h" + +void Ym2413_init( struct Ym2413_Emu* this ) +{ + this->last_time = disabled_time; this->out = 0; +} + +int Ym2413_set_rate( struct Ym2413_Emu* this, int sample_rate, int clock_rate ) +{ + OPLL_new ( &this->opll, clock_rate, sample_rate ); + OPLL_reset_patch( &this->opll, OPLL_2413_TONE ); + + Ym2413_reset( this ); + return 0; +} + +void Ym2413_reset( struct Ym2413_Emu* this ) +{ + OPLL_reset( &this->opll ); + OPLL_setMask( &this->opll, 0 ); +} + +void Ym2413_write( struct Ym2413_Emu* this, int addr, int data ) +{ + OPLL_writeIO( &this->opll, 0, addr ); + OPLL_writeIO( &this->opll, 1, data ); +} + +void Ym2413_mute_voices( struct Ym2413_Emu* this, int mask ) +{ + OPLL_setMask( &this->opll, mask ); +} + +void Ym2413_run( struct Ym2413_Emu* this, int pair_count, short* out ) +{ + while ( pair_count-- ) + { + int s = OPLL_calc( &this->opll ) << 1; + out [0] = s; + out [1] = s; + out += 2; + } +} diff --git a/apps/codecs/libgme/ym2413_emu.h b/apps/codecs/libgme/ym2413_emu.h index 68d8fe3..8f52b04 100644 --- a/apps/codecs/libgme/ym2413_emu.h +++ b/apps/codecs/libgme/ym2413_emu.h @@ -1,61 +1,61 @@ -// YM2413 FM sound chip emulator interface
-
-// Game_Music_Emu 0.6-pre
-#ifndef YM2413_EMU_H
-#define YM2413_EMU_H
-
-#include "blargg_common.h"
-#include "emu2413.h"
-
-enum { out_chan_count = 2 }; // stereo
-enum { channel_count = 14 };
-enum { disabled_time = -1 };
-
-struct Ym2413_Emu {
- OPLL opll;
-
- // Impl
- int last_time;
- short* out;
-};
-
-void Ym2413_init( struct Ym2413_Emu* this );
-
-static inline bool Ym2413_supported( void ) { return true; }
-
-// Sets output sample rate and chip clock rates, in Hz. Returns non-zero
-// if error.
-int Ym2413_set_rate( struct Ym2413_Emu* this, int sample_rate, int clock_rate );
-
-// Resets to power-up state
-void Ym2413_reset( struct Ym2413_Emu* this );
-
-// Mutes voice n if bit n (1 << n) of mask is set
-void Ym2413_mute_voices( struct Ym2413_Emu* this, int mask );
-
-// Writes data to addr
-void Ym2413_write( struct Ym2413_Emu* this, int addr, int data );
-
-// Runs and writes pair_count*2 samples to output
-void Ym2413_run( struct Ym2413_Emu* this, int pair_count, short* out );
-
-static inline void Ym2413_enable( struct Ym2413_Emu* this, bool b ) { this->last_time = b ? 0 : disabled_time; }
-static inline bool Ym2413_enabled( struct Ym2413_Emu* this ) { return this->last_time != disabled_time; }
-static inline void Ym2413_begin_frame( struct Ym2413_Emu* this, short* buf ) { this->out = buf; this->last_time = 0; }
-
-static inline int Ym2413_run_until( struct Ym2413_Emu* this, int time )
-{
- int count = time - this->last_time;
- if ( count > 0 )
- {
- if ( this->last_time < 0 )
- return false;
- this->last_time = time;
- short* p = this->out;
- this->out += count * out_chan_count;
- Ym2413_run( this, count, p );
- }
- return true;
-}
-
-#endif
+// YM2413 FM sound chip emulator interface + +// Game_Music_Emu 0.6-pre +#ifndef YM2413_EMU_H +#define YM2413_EMU_H + +#include "blargg_common.h" +#include "emu2413.h" + +enum { out_chan_count = 2 }; // stereo +enum { channel_count = 14 }; +enum { disabled_time = -1 }; + +struct Ym2413_Emu { + OPLL opll; + + // Impl + int last_time; + short* out; +}; + +void Ym2413_init( struct Ym2413_Emu* this ); + +static inline bool Ym2413_supported( void ) { return true; } + +// Sets output sample rate and chip clock rates, in Hz. Returns non-zero +// if error. +int Ym2413_set_rate( struct Ym2413_Emu* this, int sample_rate, int clock_rate ); + +// Resets to power-up state +void Ym2413_reset( struct Ym2413_Emu* this ); + +// Mutes voice n if bit n (1 << n) of mask is set +void Ym2413_mute_voices( struct Ym2413_Emu* this, int mask ); + +// Writes data to addr +void Ym2413_write( struct Ym2413_Emu* this, int addr, int data ); + +// Runs and writes pair_count*2 samples to output +void Ym2413_run( struct Ym2413_Emu* this, int pair_count, short* out ); + +static inline void Ym2413_enable( struct Ym2413_Emu* this, bool b ) { this->last_time = b ? 0 : disabled_time; } +static inline bool Ym2413_enabled( struct Ym2413_Emu* this ) { return this->last_time != disabled_time; } +static inline void Ym2413_begin_frame( struct Ym2413_Emu* this, short* buf ) { this->out = buf; this->last_time = 0; } + +static inline int Ym2413_run_until( struct Ym2413_Emu* this, int time ) +{ + int count = time - this->last_time; + if ( count > 0 ) + { + if ( this->last_time < 0 ) + return false; + this->last_time = time; + short* p = this->out; + this->out += count * out_chan_count; + Ym2413_run( this, count, p ); + } + return true; +} + +#endif diff --git a/apps/codecs/libgme/ymtables.h b/apps/codecs/libgme/ymtables.h index 51812c1..c161902 100644 --- a/apps/codecs/libgme/ymtables.h +++ b/apps/codecs/libgme/ymtables.h @@ -1,559 +1,559 @@ -#ifndef _EMUTABLES_H_
-#define _EMUTABLES_H_
-
-/* Precompiled ym2612 tables for use in Rockbox */
-
-static const int tl_coeff[] = {
- 268435455, 267712100, 266990695, 266271234, 265553712, 264838123, 264124462, 263412725, 262702906, 261994999, 261289000,
- 260584903, 259882704, 259182396, 258483976, 257787438, 257092777, 256399988, 255709066, 255020006, 254332802, 253647450,
- 252963945, 252282282, 251602456, 250924462, 250248294, 249573949, 248901421, 248230705, 247561797, 246894691, 246229383,
- 245565867, 244904140, 244244195, 243586029, 242929637, 242275013, 241622154, 240971053, 240321708, 239674112, 239028261,
- 238384150, 237741775, 237101131, 236462214, 235825018, 235189539, 234555773, 233923714, 233293359, 232664702, 232037740,
- 231412466, 230788878, 230166970, 229546738, 228928178, 228311284, 227696052, 227082479, 226470558, 225860287, 225251660,
- 224644674, 224039323, 223435603, 222833510, 222233039, 221634187, 221036948, 220441319, 219847295, 219254871, 218664044,
- 218074809, 217487162, 216901098, 216316614, 215733704, 215152366, 214572594, 213994384, 213417732, 212842635, 212269087,
- 211697084, 211126623, 210557699, 209990308, 209424446, 208860109, 208297293, 207735993, 207176206, 206617927, 206061153,
- 205505879, 204952102, 204399816, 203849019, 203299706, 202751873, 202205517, 201660633, 201117217, 200575266, 200034774,
- 199495740, 198958158, 198422024, 197887335, 197354088, 196822277, 196291899, 195762950, 195235427, 194709325, 194184641,
- 193661370, 193139510, 192619056, 192100005, 191582352, 191066094, 190551228, 190037748, 189525653, 189014937, 188505598,
- 187997631, 187491033, 186985800, 186481928, 185979414, 185478255, 184978446, 184479983, 183982864, 183487085, 182992641,
- 182499530, 182007748, 181517291, 181028155, 180540338, 180053835, 179568643, 179084759, 178602178, 178120898, 177640915,
- 177162225, 176684825, 176208712, 175733881, 175260330, 174788055, 174317053, 173847320, 173378853, 172911648, 172445702,
- 171981012, 171517574, 171055385, 170594441, 170134740, 169676277, 169219049, 168763054, 168308287, 167854746, 167402427,
- 166951327, 166501443, 166052770, 165605307, 165159050, 164713995, 164270139, 163827480, 163386013, 162945736, 162506646,
- 162068738, 161632011, 161196460, 160762083, 160328877, 159896838, 159465963, 159036250, 158607694, 158180293, 157754044,
- 157328943, 156904988, 156482176, 156060502, 155639965, 155220562, 154802288, 154385142, 153969119, 153554218, 153140435,
- 152727766, 152316210, 151905763, 151496422, 151088184, 150681046, 150275005, 149870058, 149466203, 149063435, 148661753,
- 148261154, 147861634, 147463190, 147065821, 146669522, 146274291, 145880125, 145487021, 145094976, 144703988, 144314054,
- 143925170, 143537334, 143150543, 142764795, 142380086, 141996414, 141613775, 141232168, 140851589, 140472035, 140093505,
- 139715994, 139339501, 138964022, 138589555, 138216097, 137843646, 137472198, 137101751, 136732302, 136363849, 135996388,
- 135629918, 135264436, 134899938, 134536423, 134173887, 133812328, 133451743, 133092130, 132733486, 132375808, 132019095,
- 131663342, 131308548, 130954711, 130601826, 130249893, 129898908, 129548869, 129199773, 128851618, 128504401, 128158119,
- 127812771, 127468353, 127124864, 126782300, 126440659, 126099939, 125760137, 125421250, 125083277, 124746214, 124410060,
- 124074812, 123740467, 123407023, 123074477, 122742828, 122412072, 122082208, 121753232, 121425143, 121097939, 120771615,
- 120446172, 120121605, 119797912, 119475092, 119153142, 118832060, 118511843, 118192488, 117873994, 117556359, 117239579,
- 116923653, 116608578, 116294353, 115980974, 115668439, 115356747, 115045894, 114735880, 114426700, 114118354, 113810839,
- 113504152, 113198292, 112893256, 112589042, 112285648, 111983071, 111681310, 111380362, 111080225, 110780896, 110482375,
- 110184657, 109887742, 109591627, 109296310, 109001789, 108708061, 108415125, 108122978, 107831619, 107541044, 107251253,
- 106962243, 106674011, 106386556, 106099876, 105813968, 105528830, 105244461, 104960859, 104678020, 104395944, 104114628,
- 103834069, 103554267, 103275219, 102996923, 102719377, 102442578, 102166526, 101891217, 101616650, 101342823, 101069734,
- 100797381, 100525762, 100254875, 99984718, 99715288, 99446585, 99178606, 98911349, 98644812, 98378993, 98113891,
- 97849503, 97585828, 97322863, 97060606, 96799057, 96538212, 96278070, 96018629, 95759887, 95501842, 95244493,
- 94987837, 94731873, 94476599, 94222012, 93968112, 93714895, 93462361, 93210508, 92959333, 92708835, 92459012,
- 92209863, 91961384, 91713575, 91466434, 91219959, 90974149, 90729000, 90484512, 90240683, 89997511, 89754994,
- 89513131, 89271920, 89031358, 88791445, 88552178, 88313556, 88075578, 87838240, 87601542, 87365481, 87130057,
- 86895267, 86661110, 86427584, 86194687, 85962418, 85730775, 85499756, 85269359, 85039583, 84810427, 84581888,
- 84353965, 84126656, 83899959, 83673874, 83448397, 83223528, 82999266, 82775607, 82552551, 82330096, 82108241,
- 81886984, 81666322, 81446256, 81226782, 81007900, 80789608, 80571904, 80354786, 80138254, 79922305, 79706938,
- 79492151, 79277943, 79064313, 78851258, 78638777, 78426868, 78215531, 78004763, 77794564, 77584930, 77375862,
- 77167357, 76959413, 76752031, 76545207, 76338940, 76133229, 75928072, 75723469, 75519416, 75315914, 75112960,
- 74910552, 74708690, 74507373, 74306597, 74106363, 73906668, 73707512, 73508892, 73310807, 73113256, 72916237,
- 72719749, 72523791, 72328361, 72133457, 71939079, 71745225, 71551892, 71359081, 71166789, 70975016, 70783759,
- 70593018, 70402791, 70213076, 70023872, 69835179, 69646994, 69459315, 69272143, 69085475, 68899310, 68713647,
- 68528484, 68343820, 68159653, 67975983, 67792808, 67610127, 67427937, 67246239, 67065030, 66884310, 66704076,
- 66524328, 66345065, 66166285, 65987986, 65810168, 65632829, 65455968, 65279583, 65103674, 64928239, 64753277,
- 64578786, 64404765, 64231213, 64058129, 63885511, 63713359, 63541670, 63370444, 63199679, 63029375, 62859529,
- 62690141, 62521210, 62352734, 62184711, 62017142, 61850024, 61683357, 61517138, 61351368, 61186044, 61021166,
- 60856731, 60692741, 60529192, 60366083, 60203414, 60041184, 59879391, 59718034, 59557111, 59396622, 59236566,
- 59076941, 58917746, 58758980, 58600642, 58442730, 58285245, 58128183, 57971545, 57815329, 57659533, 57504158,
- 57349201, 57194662, 57040539, 56886832, 56733539, 56580659, 56428190, 56276133, 56124486, 55973247, 55822415,
- 55671990, 55521971, 55372355, 55223143, 55074333, 54925924, 54777915, 54630305, 54483092, 54336276, 54189856,
- 54043830, 53898198, 53752959, 53608110, 53463652, 53319583, 53175903, 53032610, 52889702, 52747180, 52605042,
- 52463287, 52321914, 52180922, 52040310, 51900076, 51760221, 51620743, 51481640, 51342912, 51204558, 51066577,
- 50928968, 50791729, 50654860, 50518360, 50382228, 50246463, 50111064, 49976029, 49841359, 49707051, 49573105,
- 49439520, 49306295, 49173429, 49040922, 48908771, 48776976, 48645537, 48514451, 48383719, 48253339, 48123311,
- 47993633, 47864304, 47735324, 47606691, 47478405, 47350465, 47222869, 47095618, 46968709, 46842142, 46715916,
- 46590031, 46464484, 46339276, 46214406, 46089871, 45965673, 45841809, 45718279, 45595082, 45472216, 45349682,
- 45227478, 45105603, 44984057, 44862838, 44741946, 44621380, 44501139, 44381221, 44261627, 44142355, 44023404,
- 43904774, 43786464, 43668472, 43550798, 43433442, 43316402, 43199677, 43083266, 42967170, 42851386, 42735914,
- 42620753, 42505903, 42391362, 42277130, 42163206, 42049588, 41936277, 41823271, 41710570, 41598172, 41486077,
- 41374285, 41262793, 41151602, 41040711, 40930118, 40819823, 40709826, 40600125, 40490720, 40381609, 40272793,
- 40164269, 40056039, 39948099, 39840451, 39733093, 39626024, 39519243, 39412751, 39306545, 39200625, 39094991,
- 38989642, 38884576, 38779794, 38675294, 38571075, 38467138, 38363480, 38260102, 38157002, 38054180, 37951635,
- 37849367, 37747374, 37645656, 37544212, 37443042, 37342144, 37241518, 37141163, 37041078, 36941264, 36841718,
- 36742440, 36643430, 36544687, 36446210, 36347998, 36250051, 36152368, 36054948, 35957790, 35860895, 35764260,
- 35667886, 35571772, 35475916, 35380319, 35284980, 35189897, 35095071, 35000500, 34906184, 34812122, 34718314,
- 34624758, 34531454, 34438402, 34345601, 34253050, 34160748, 34068695, 33976890, 33885332, 33794021, 33702956,
- 33612137, 33521562, 33431231, 33341144, 33251299, 33161697, 33072336, 32983216, 32894336, 32805695, 32717294,
- 32629130, 32541204, 32453515, 32366063, 32278846, 32191864, 32105116, 32018602, 31932322, 31846273, 31760457,
- 31674872, 31589518, 31504393, 31419498, 31334832, 31250394, 31166183, 31082200, 30998442, 30914911, 30831604,
- 30748522, 30665664, 30583029, 30500617, 30418426, 30336458, 30254710, 30173183, 30091875, 30010786, 29929916,
- 29849263, 29768829, 29688610, 29608608, 29528822, 29449250, 29369893, 29290750, 29211820, 29133103, 29054598,
- 28976304, 28898222, 28820350, 28742687, 28665234, 28587990, 28510954, 28434125, 28357503, 28281088, 28204879,
- 28128875, 28053076, 27977482, 27902091, 27826903, 27751917, 27677134, 27602552, 27528172, 27453991, 27380011,
- 27306230, 27232648, 27159264, 27086078, 27013089, 26940296, 26867700, 26795300, 26723094, 26651083, 26579267,
- 26507643, 26436213, 26364975, 26293929, 26223075, 26152412, 26081939, 26011656, 25941562, 25871657, 25801940,
- 25732412, 25663071, 25593916, 25524948, 25456166, 25387569, 25319157, 25250929, 25182886, 25115025, 25047348,
- 24979852, 24912539, 24845407, 24778456, 24711686, 24645095, 24578684, 24512451, 24446397, 24380522, 24314823,
- 24249302, 24183957, 24118789, 24053796, 23988978, 23924335, 23859866, 23795570, 23731448, 23667499, 23603722,
- 23540117, 23476683, 23413421, 23350328, 23287406, 23224653, 23162070, 23099655, 23037408, 22975329, 22913417,
- 22851673, 22790094, 22728681, 22667434, 22606352, 22545435, 22484682, 22424092, 22363666, 22303402, 22243301,
- 22183362, 22123584, 22063968, 22004512, 21945216, 21886080, 21827104, 21768286, 21709627, 21651126, 21592783,
- 21534597, 21476567, 21418694, 21360977, 21303416, 21246009, 21188758, 21131660, 21074717, 21017926, 20961289,
- 20904805, 20848473, 20792292, 20736263, 20680385, 20624657, 20569080, 20513652, 20458374, 20403245, 20348264,
- 20293432, 20238747, 20184209, 20129819, 20075575, 20021477, 19967525, 19913719, 19860057, 19806540, 19753167,
- 19699938, 19646853, 19593910, 19541111, 19488453, 19435937, 19383563, 19331330, 19279238, 19227286, 19175474,
- 19123802, 19072269, 19020875, 18969619, 18918502, 18867522, 18816680, 18765974, 18715405, 18664973, 18614676,
- 18564515, 18514489, 18464598, 18414842, 18365219, 18315730, 18266375, 18217152, 18168062, 18119105, 18070279,
- 18021585, 17973022, 17924590, 17876289, 17828118, 17780076, 17732164, 17684381, 17636727, 17589201, 17541803,
- 17494533, 17447391, 17400375, 17353486, 17306724, 17260087, 17213577, 17167191, 17120930, 17074795, 17028783,
- 16982896, 16937132, 16891491, 16845974, 16800579, 16755306, 16710155, 16665126, 16620219, 16575432, 16530766,
- 16486221, 16441795, 16397490, 16353303, 16309236, 16265287, 16221457, 16177745, 16134151, 16090674, 16047314,
- 16004072, 15960945, 15917935, 15875041, 15832263, 15789599, 15747051, 15704617, 15662298, 15620093, 15578001,
- 15536023, 15494158, 15452406, 15410766, 15369239, 15327823, 15286519, 15245327, 15204245, 15163274, 15122414,
- 15081663, 15041023, 15000491, 14960070, 14919757, 14879552, 14839456, 14799468, 14759588, 14719815, 14680150,
- 14640591, 14601139, 14561793, 14522554, 14483420, 14444391, 14405468, 14366649, 14327935, 14289326, 14250820,
- 14212418, 14174120, 14135925, 14097833, 14059843, 14021956, 13984171, 13946488, 13908906, 13871426, 13834047,
- 13796768, 13759590, 13722512, 13685534, 13648655, 13611876, 13575196, 13538615, 13502132, 13465748, 13429462,
- 13393273, 13357183, 13321189, 13285292, 13249492, 13213789, 13178182, 13142670, 13107255, 13071934, 13036709,
- 13001579, 12966544, 12931603, 12896756, 12862003, 12827344, 12792778, 12758305, 12723925, 12689638, 12655443,
- 12621341, 12587330, 12553411, 12519583, 12485846, 12452201, 12418646, 12385181, 12351807, 12318522, 12285327,
- 12252222, 12219206, 12186279, 12153440, 12120690, 12088029, 12055455, 12022969, 11990571, 11958260, 11926036,
- 11893899, 11861848, 11829884, 11798006, 11766214, 11734507, 11702886, 11671350, 11639900, 11608533, 11577252,
- 11546055, 11514941, 11483912, 11452966, 11422104, 11391325, 11360628, 11330015, 11299484, 11269035, 11238668,
- 11208384, 11178180, 11148058, 11118018, 11088058, 11058179, 11028380, 10998662, 10969024, 10939466, 10909987,
- 10880588, 10851268, 10822027, 10792865, 10763781, 10734776, 10705849, 10677000, 10648228, 10619535, 10590918,
- 10562379, 10533916, 10505530, 10477221, 10448988, 10420831, 10392750, 10364745, 10336815, 10308960, 10281180,
- 10253476, 10225846, 10198290, 10170809, 10143401, 10116068, 10088808, 10061622, 10034509, 10007468, 9980501,
- 9953607, 9926785, 9900035, 9873357, 9846752, 9820217, 9793755, 9767364, 9741043, 9714794, 9688616,
- 9662508, 9636470, 9610503, 9584605, 9558778, 9533019, 9507331, 9481711, 9456161, 9430679, 9405266,
- 9379922, 9354646, 9329438, 9304298, 9279225, 9254221, 9229283, 9204413, 9179610, 9154874, 9130204,
- 9105601, 9081064, 9056593, 9032188, 9007849, 8983576, 8959368, 8935225, 8911147, 8887134, 8863186,
- 8839302, 8815483, 8791728, 8768037, 8744409, 8720846, 8697346, 8673909, 8650535, 8627225, 8603977,
- 8580792, 8557669, 8534608, 8511610, 8488674, 8465799, 8442987, 8420235, 8397545, 8374916, 8352348,
- 8329841, 8307395, 8285009, 8262683, 8240418, 8218212, 8196067, 8173981, 8151954, 8129987, 8108079,
- 8086230, 8064440, 8042709, 8021036, 7999422, 7977866, 7956368, 7934928, 7913545, 7892221, 7870954,
- 7849744, 7828591, 7807495, 7786456, 7765474, 7744548, 7723679, 7702866, 7682109, 7661408, 7640763,
- 7620173, 7599639, 7579160, 7558737, 7538368, 7518055, 7497796, 7477591, 7457441, 7437346, 7417304,
- 7397317, 7377383, 7357503, 7337677, 7317904, 7298185, 7278518, 7258905, 7239344, 7219836, 7200381,
- 7180978, 7161627, 7142329, 7123082, 7103888, 7084745, 7065654, 7046614, 7027625, 7008688, 6989802,
- 6970966, 6952181, 6933447, 6914764, 6896130, 6877547, 6859014, 6840531, 6822098, 6803715, 6785381,
- 6767096, 6748861, 6730675, 6712537, 6694449, 6676410, 6658419, 6640476, 6622582, 6604736, 6586938,
- 6569188, 6551486, 6533832, 6516225, 6498666, 6481154, 6463689, 6446272, 6428901, 6411577, 6394299,
- 6377069, 6359884, 6342746, 6325655, 6308609, 6291609, 6274655, 6257747, 6240884, 6224066, 6207294,
- 6190568, 6173886, 6157249, 6140657, 6124110, 6107607, 6091149, 6074735, 6058365, 6042040, 6025758,
- 6009521, 5993327, 5977177, 5961070, 5945007, 5928987, 5913010, 5897076, 5881185, 5865337, 5849532,
- 5833769, 5818049, 5802371, 5786735, 5771141, 5755590, 5740080, 5724612, 5709186, 5693802, 5678459,
- 5663157, 5647896, 5632677, 5617498, 5602361, 5587264, 5572208, 5557193, 5542218, 5527283, 5512389,
- 5497534, 5482720, 5467946, 5453211, 5438517, 5423861, 5409246, 5394669, 5380132, 5365635, 5351176,
- 5336756, 5322375, 5308033, 5293729, 5279464, 5265237, 5251049, 5236899, 5222787, 5208713, 5194677,
- 5180679, 5166719, 5152796, 5138911, 5125063, 5111252, 5097479, 5083743, 5070044, 5056382, 5042756,
- 5029167, 5015615, 5002100, 4988620, 4975178, 4961771, 4948400, 4935066, 4921767, 4908505, 4895278,
- 4882086, 4868931, 4855810, 4842725, 4829676, 4816661, 4803682, 4790737, 4777827, 4764953, 4752112,
- 4739307, 4726536, 4713799, 4701097, 4688429, 4675795, 4663195, 4650629, 4638097, 4625599, 4613134,
- 4600703, 4588306, 4575941, 4563611, 4551313, 4539049, 4526817, 4514619, 4502453, 4490320, 4478220,
- 4466153, 4454118, 4442115, 4430145, 4418207, 4406301, 4394428, 4382586, 4370776, 4358998, 4347252,
- 4335538, 4323855, 4312203, 4300583, 4288994, 4277437, 4265910, 4254415, 4242950, 4231517, 4220114,
- 4208742, 4197401, 4186090, 4174810, 4163560, 4152340, 4141151, 4129992, 4118863, 4107764, 4096694,
- 4085655, 4074645, 4063665, 4052715, 4041794, 4030903, 4020041, 4009208, 3998404, 3987630, 3976884,
- 3966168, 3955480, 3944821, 3934191, 3923590, 3913017, 3902472, 3891956, 3881469, 3871009, 3860578,
- 3850175, 3839800, 3829453, 3819133, 3808842, 3798578, 3788342, 3778134, 3767953, 3757799, 3747673,
- 3737574, 3727503, 3717458, 3707441, 3697450, 3687487, 3677550, 3667640, 3657757, 3647900, 3638070,
- 3628267, 3618490, 3608739, 3599014, 3589316, 3579644, 3569998, 3560378, 3550783, 3541215, 3531673,
- 3522156, 3512665, 3503199, 3493759, 3484344, 3474955, 3465591, 3456252, 3446939, 3437650, 3428387,
- 3419148, 3409935, 3400746, 3391582, 3382443, 3373328, 3364238, 3355172, 3346131, 3337114, 3328122,
- 3319153, 3310209, 3301289, 3292393, 3283521, 3274673, 3265849, 3257048, 3248271, 3239518, 3230789,
- 3222083, 3213400, 3204741, 3196105, 3187493, 3178903, 3170337, 3161794, 3153274, 3144777, 3136302,
- 3127851, 3119422, 3111016, 3102633, 3094272, 3085934, 3077619, 3069325, 3061054, 3052806, 3044579,
- 3036375, 3028193, 3020033, 3011895, 3003779, 2995684, 2987612, 2979561, 2971532, 2963525, 2955539,
- 2947575, 2939632, 2931710, 2923810, 2915931, 2908074, 2900237, 2892422, 2884628, 2876855, 2869102,
- 2861371, 2853660, 2845971, 2838302, 2830653, 2823025, 2815418, 2807832, 2800265, 2792719, 2785194,
- 2777689, 2770203, 2762739, 2755294, 2747869, 2740464, 2733080, 2725715, 2718370, 2711045, 2703739,
- 2696453, 2689187, 2681941, 2674714, 2667506, 2660318, 2653149, 2646000, 2638870, 2631759, 2624667,
- 2617594, 2610540, 2603506, 2596490, 2589493, 2582515, 2575556, 2568616, 2561694, 2554791, 2547907,
- 2541041, 2534194, 2527365, 2520554, 2513762, 2506988, 2500233, 2493495, 2486776, 2480075, 2473392,
- 2466727, 2460080, 2453450, 2446839, 2440246, 2433670, 2427112, 2420571, 2414049, 2407544, 2401056,
- 2394586, 2388133, 2381698, 2375280, 2368879, 2362496, 2356130, 2349780, 2343448, 2337134, 2330836,
- 2324555, 2318291, 2312044, 2305813, 2299600, 2293403, 2287223, 2281060, 2274913, 2268783, 2262669,
- 2256572, 2250491, 2244427, 2238379, 2232347, 2226331, 2220332, 2214349, 2208382, 2202431, 2196496,
- 2190577, 2184674, 2178787, 2172916, 2167060, 2161221, 2155397, 2149589, 2143796, 2138019, 2132258,
- 2126512, 2120782, 2115067, 2109368, 2103683, 2098015, 2092361, 2086723, 2081100, 2075492, 2069899,
- 2064321, 2058758, 2053211, 2047678, 2042160, 2036657, 2031169, 2025695, 2020237, 2014793, 2009364,
- 2003949, 1998549, 1993163, 1987792, 1982436, 1977094, 1971766, 1966453, 1961154, 1955869, 1950599,
- 1945342, 1940100, 1934872, 1929658, 1924458, 1919272, 1914101, 1908943, 1903799, 1898668, 1893552,
- 1888450, 1883361, 1878286, 1873224, 1868176, 1863142, 1858122, 1853115, 1848121, 1843141, 1838174,
- 1833221, 1828281, 1823354, 1818441, 1813540, 1808654, 1803780, 1798919, 1794072, 1789237, 1784416,
- 1779607, 1774812, 1770029, 1765259, 1760502, 1755758, 1751027, 1746309, 1741603, 1736910, 1732229,
- 1727561, 1722906, 1718263, 1713633, 1709015, 1704410, 1699817, 1695237, 1690669, 1686113, 1681569,
- 1677038, 1672519, 1668012, 1663517, 1659034, 1654564, 1650105, 1645659, 1641224, 1636801, 1632391,
- 1627992, 1623605, 1619230, 1614866, 1610515, 1606175, 1601847, 1597530, 1593225, 1588932, 1584650,
- 1580380, 1576122, 1571874, 1567639, 1563414, 1559201, 1555000, 1550810, 1546631, 1542463, 1538306,
- 1534161, 1530027, 1525904, 1521792, 1517691, 1513602, 1509523, 1505455, 1501399, 1497353, 1493318,
- 1489294, 1485281, 1481278, 1477287, 1473306, 1469336, 1465376, 1461427, 1457489, 1453562, 1449645,
- 1445738, 1441843, 1437957, 1434082, 1430218, 1426364, 1422520, 1418687, 1414864, 1411051, 1407249,
- 1403457, 1399675, 1395903, 1392142, 1388390, 1384649, 1380918, 1377197, 1373486, 1369784, 1366093,
- 1362412, 1358741, 1355079, 1351428, 1347786, 1344154, 1340532, 1336920, 1333317, 1329724, 1326141,
- 1322567, 1319004, 1315449, 1311904, 1308369, 1304844, 1301327, 1297821, 1294323, 1290836, 1287357,
- 1283888, 1280429, 1276978, 1273537, 1270105, 1266683, 1263269, 1259865, 1256470, 1253084, 1249708,
- 1246340, 1242982, 1239632, 1236292, 1232960, 1229638, 1226324, 1223020, 1219724, 1216437, 1213159,
- 1209890, 1206630, 1203378, 1200136, 1196902, 1193676, 1190460, 1187252, 1184052, 1180862, 1177680,
- 1174506, 1171341, 1168185, 1165037, 1161897, 1158767, 1155644, 1152530, 1149424, 1146327, 1143238,
- 1140157, 1137085, 1134021, 1130965, 1127917, 1124878, 1121846, 1118823, 1115809, 1112802, 1109803,
- 1106813, 1103830, 1100855, 1097889, 1094931, 1091980, 1089037, 1086103, 1083176, 1080257, 1077346,
- 1074443, 1071548, 1068660, 1065781, 1062909, 1060044, 1057188, 1054339, 1051498, 1048664, 1045839,
- 1043020, 1040210, 1037407, 1034611, 1031823, 1029043, 1026270, 1023504, 1020746, 1017996, 1015252,
- 1012517, 1009788, 1007067, 1004353, 1001647, 998948, 996256, 993571, 990894, 988224, 985561,
- 982905, 980256, 977615, 974980, 972353, 969733, 967120, 964514, 961915, 959323, 956737,
- 954159, 951588, 949024, 946467, 943916, 941373, 938836, 936306, 933783, 931267, 928757,
- 926254, 923758, 921269, 918787, 916311, 913842, 911379, 908923, 906474, 904031, 901595,
- 899166, 896743, 894326, 891916, 889513, 887116, 884725, 882341, 879963, 877592, 875227,
- 872869, 870517, 868171, 865831, 863498, 861171, 858851, 856536, 854228, 851926, 849631,
- 847341, 845058, 842781, 840510, 838245, 835986, 833733, 831487, 829246, 827011, 824783,
- 822560, 820344, 818133, 815929, 813730, 811537, 809350, 807169, 804994, 802825, 800662,
- 798504, 796352, 794206, 792066, 789932, 787803, 785680, 783563, 781452, 779346, 777246,
- 775151, 773062, 770979, 768902, 766830, 764763, 762703, 760647, 758598, 756553, 754515,
- 752482, 750454, 748432, 746415, 744403, 742397, 740397, 738402, 736412, 734428, 732448,
- 730475, 728506, 726543, 724585, 722633, 720686, 718744, 716807, 714875, 712949, 711028,
- 709112, 707201, 705295, 703394, 701499, 699609, 697723, 695843, 693968, 692098, 690233,
- 688373, 686518, 684668, 682823, 680983, 679148, 677318, 675493, 673673, 671857, 670047,
- 668241, 666441, 664645, 662854, 661067, 659286, 657510, 655738, 653971, 652208, 650451,
- 648698, 646950, 645207, 643468, 641734, 640005, 638280, 636560, 634845, 633134, 631428,
- 629727, 628030, 626337, 624650, 622966, 621288, 619613, 617944, 616279, 614618, 612962,
- 611310, 609663, 608020, 606381, 604747, 603118, 601492, 599872, 598255, 596643, 595035,
- 593432, 591833, 590238, 588647, 587061, 585479, 583901, 582328, 580759, 579194, 577633,
- 576076, 574524, 572976, 571432, 569892, 568356, 566825, 565297, 563774, 562255, 560740,
- 559229, 557722, 556219, 554720, 553225, 551734, 550248, 548765, 547286, 545811, 544341,
- 542874, 541411, 539952, 538497, 537046, 535599, 534155, 532716, 531280, 529849, 528421,
- 526997, 525577, 524161, 522748, 521340, 519935, 518534, 517136, 515743, 514353, 512967,
- 511585, 510206, 508831, 507460, 506093, 504729, 503369, 502012, 500660, 499310, 497965,
- 496623, 495285, 493950, 492619, 491292, 489968, 488648, 487331, 486018, 484708, 483402,
- 482099, 480800, 479504, 478212, 476924, 475638, 474357, 473078, 471804, 470532, 469264,
- 468000, 466739, 465481, 464227, 462976, 461728, 460484, 459243, 458005, 456771, 455540,
- 454313, 453089, 451868, 450650, 449436, 448225, 447017, 445812, 444611, 443413, 442218,
- 441026, 439838, 438653, 437470, 436292, 435116, 433943, 432774, 431608, 430445, 429285,
- 428128, 426974, 425824, 424676, 423532, 422391, 421252, 420117, 418985, 417856, 416730,
- 415607, 414487, 413370, 412256, 411146, 410038, 408933, 407831, 406732, 405636, 404543,
- 403453, 402365, 401281, 400200, 399121, 398046, 396973, 395903, 394837, 393773, 392712,
- 391653, 390598, 389545, 388496, 387449, 386405, 385363, 384325, 383289, 382257, 381226,
- 380199, 379175, 378153, 377134, 376118, 375104, 374093, 373085, 372080, 371077, 370077,
- 369080, 368085, 367094, 366104, 365118, 364134, 363153, 362174, 361198, 360225, 359254,
- 358286, 357321, 356358, 355397, 354440, 353485, 352532, 351582, 350635, 349690, 348748,
- 347808, 346871, 345936, 345004, 344074, 343147, 342222, 341300, 340380, 339463, 338548,
- 337636, 336726, 335819, 334914, 334011, 333111, 332214, 331318, 330426, 329535, 328647,
- 327762, 326878, 325997, 325119, 324243, 323369, 322498, 321629, 320762, 319898, 319036,
- 318176, 317319, 316463, 315611, 314760, 313912, 313066, 312222, 311381, 310542, 309705,
- 308871, 308038, 307208, 306380, 305555, 304731, 303910, 303091, 302275, 301460, 300648,
- 299838, 299030, 298224, 297420, 296619, 295819, 295022, 294227, 293434, 292644, 291855,
- 291069, 290284, 289502, 288722, 287944, 287168, 286394, 285622, 284853, 284085, 283320,
- 282556, 281795, 281035, 280278, 279523, 278770, 278018, 277269, 276522, 275777, 275034,
- 274293, 273553, 272816, 272081, 271348, 270617, 269888, 269160, 268435, 267712, 266990,
- 266271, 265553, 264838, 264124, 263412, 262702, 261994, 261289, 260584, 259882, 259182,
- 258483, 257787, 257092, 256399, 255709, 255020, 254332, 253647, 252963, 252282, 251602,
- 250924, 250248, 249573, 248901, 248230, 247561, 246894, 246229, 245565, 244904, 244244,
- 243586, 242929, 242275, 241622, 240971, 240321, 239674, 239028, 238384, 237741, 237101,
- 236462, 235825, 235189, 234555, 233923, 233293, 232664, 232037, 231412, 230788, 230166,
- 229546, 228928, 228311, 227696, 227082, 226470, 225860, 225251, 224644, 224039, 223435,
- 222833, 222233, 221634, 221036, 220441, 219847, 219254, 218664, 218074, 217487, 216901,
- 216316, 215733, 215152, 214572, 213994, 213417, 212842, 212269, 211697, 211126, 210557,
- 209990, 209424, 208860, 208297, 207735, 207176, 206617, 206061, 205505, 204952, 204399,
- 203849, 203299, 202751, 202205, 201660, 201117, 200575, 200034, 199495, 198958, 198422,
- 197887, 197354, 196822, 196291, 195762, 195235, 194709, 194184, 193661, 193139, 192619,
- 192100, 191582, 191066, 190551, 190037, 189525, 189014, 188505, 187997, 187491, 186985,
- 186481, 185979, 185478, 184978, 184479, 183982, 183487, 182992, 182499, 182007, 181517,
- 181028, 180540, 180053, 179568, 179084, 178602, 178120, 177640, 177162, 176684, 176208,
- 175733, 175260, 174788, 174317, 173847, 173378, 172911, 172445, 171981, 171517, 171055,
- 170594, 170134, 169676, 169219, 168763, 168308, 167854, 167402, 166951, 166501, 166052,
- 165605, 165159, 164713, 164270, 163827, 163386, 162945, 162506, 162068, 161632, 161196,
- 160762, 160328, 159896, 159465, 159036, 158607, 158180, 157754, 157328, 156904, 156482,
- 156060, 155639, 155220, 154802, 154385, 153969, 153554, 153140, 152727, 152316, 151905,
- 151496, 151088, 150681, 150275, 149870, 149466, 149063, 148661, 148261, 147861, 147463,
- 147065, 146669, 146274, 145880, 145487, 145094, 144703, 144314, 143925, 143537, 143150,
- 142764, 142380, 141996, 141613, 141232, 140851, 140472, 140093, 139715, 139339, 138964,
- 138589, 138216, 137843, 137472, 137101, 136732, 136363, 135996, 135629, 135264, 134899,
- 134536, 134173, 133812, 133451, 133092, 132733, 132375, 132019, 131663, 131308, 130954,
- 130601, 130249, 129898, 129548, 129199, 128851, 128504, 128158, 127812, 127468, 127124,
- 126782, 126440, 126099, 125760, 125421, 125083, 124746, 124410, 124074, 123740, 123407,
- 123074, 122742, 122412, 122082, 121753, 121425, 121097, 120771, 120446, 120121, 119797,
- 119475, 119153, 118832, 118511, 118192, 117873, 117556, 117239, 116923, 116608, 116294,
- 115980, 115668, 115356, 115045, 114735, 114426, 114118, 113810, 113504, 113198, 112893,
- 112589, 112285, 111983, 111681, 111380, 111080, 110780, 110482, 110184, 109887, 109591,
- 109296, 109001, 108708, 108415, 108122, 107831, 107541, 107251, 106962, 106674, 106386,
- 106099, 105813, 105528, 105244, 104960, 104678, 104395, 104114, 103834, 103554, 103275,
- 102996, 102719, 102442, 102166, 101891, 101616, 101342, 101069, 100797, 100525, 100254,
- 99984, 99715, 99446, 99178, 98911, 98644, 98378, 98113, 97849, 97585, 97322,
- 97060, 96799, 96538, 96278, 96018, 95759, 95501, 95244, 94987, 94731, 94476,
- 94222, 93968, 93714, 93462, 93210, 92959, 92708, 92459, 92209, 91961, 91713,
- 91466, 91219, 90974, 90729, 90484, 90240, 89997, 89754, 89513, 89271, 89031,
- 88791, 88552, 88313, 88075, 87838, 87601, 87365, 87130, 86895, 86661, 86427,
- 86194, 85962, 85730, 85499, 85269, 85039, 84810, 84581, 84353, 84126, 83899,
- 83673, 83448, 83223, 82999, 82775, 82552, 82330, 82108, 81886, 81666, 81446,
- 81226, 81007, 80789, 80571, 80354, 80138, 79922, 79706, 79492, 79277, 79064,
- 78851, 78638, 78426, 78215, 78004, 77794, 77584, 77375, 77167, 76959, 76752,
- 76545, 76338, 76133, 75928, 75723, 75519, 75315, 75112, 74910, 74708, 74507,
- 74306, 74106, 73906, 73707, 73508, 73310, 73113, 72916, 72719, 72523, 72328,
- 72133, 71939, 71745, 71551, 71359, 71166, 70975, 70783, 70593, 70402, 70213,
- 70023, 69835, 69646, 69459, 69272, 69085, 68899, 68713, 68528, 68343, 68159,
- 67975, 67792, 67610, 67427, 67246, 67065, 66884, 66704, 66524, 66345, 66166,
- 65987, 65810, 65632, 65455, 65279, 65103, 64928, 64753, 64578, 64404, 64231,
- 64058, 63885, 63713, 63541, 63370, 63199, 63029, 62859, 62690, 62521, 62352,
- 62184, 62017, 61850, 61683, 61517, 61351, 61186, 61021, 60856, 60692, 60529,
- 60366, 60203, 60041, 59879, 59718, 59557, 59396, 59236, 59076, 58917, 58758,
- 58600, 58442, 58285, 58128, 57971, 57815, 57659, 57504, 57349, 57194, 57040,
- 56886, 56733, 56580, 56428, 56276, 56124, 55973, 55822, 55671, 55521, 55372,
- 55223, 55074, 54925, 54777, 54630, 54483, 54336, 54189, 54043, 53898, 53752,
- 53608, 53463, 53319, 53175, 53032, 52889, 52747, 52605, 52463, 52321, 52180,
- 52040, 51900, 51760, 51620, 51481, 51342, 51204, 51066, 50928, 50791, 50654,
- 50518, 50382, 50246, 50111, 49976, 49841, 49707, 49573, 49439, 49306, 49173,
- 49040, 48908, 48776, 48645, 48514, 48383, 48253, 48123, 47993, 47864, 47735,
- 47606, 47478, 47350, 47222, 47095, 46968, 46842, 46715, 46590, 46464, 46339,
- 46214, 46089, 45965, 45841, 45718, 45595, 45472, 45349, 45227, 45105, 44984,
- 44862, 44741, 44621, 44501, 44381, 44261, 44142, 44023, 43904, 43786, 43668,
- 43550, 43433, 43316, 43199, 43083, 42967, 42851, 42735, 42620, 42505, 42391,
- 42277, 42163, 42049, 41936, 41823, 41710, 41598, 41486, 41374, 41262, 41151,
- 41040, 40930, 40819, 40709, 40600, 40490, 40381, 40272, 40164, 40056, 39948,
- 39840, 39733, 39626, 39519, 39412, 39306, 39200, 39094, 38989, 38884, 38779,
- 38675, 38571, 38467, 38363, 38260, 38157, 38054, 37951, 37849, 37747, 37645,
- 37544, 37443, 37342, 37241, 37141, 37041, 36941, 36841, 36742, 36643, 36544,
- 36446, 36347, 36250, 36152, 36054, 35957, 35860, 35764, 35667, 35571, 35475,
- 35380, 35284, 35189, 35095, 35000, 34906, 34812, 34718, 34624, 34531, 34438,
- 34345, 34253, 34160, 34068, 33976, 33885
-};
-
-static const short sindb_coeff[] = {
- 2401, 2144, 1994, 1887, 1804, 1737, 1680, 1630, 1587, 1548, 1512, 1480, 1450,
- 1423, 1397, 1373, 1351, 1330, 1310, 1291, 1273, 1255, 1239, 1223, 1208, 1194,
- 1180, 1166, 1153, 1141, 1128, 1117, 1105, 1094, 1084, 1073, 1063, 1053, 1043,
- 1034, 1025, 1016, 1007, 999, 990, 982, 974, 967, 959, 952, 944, 937,
- 930, 923, 916, 910, 903, 897, 890, 884, 878, 872, 866, 860, 855,
- 849, 843, 838, 832, 827, 822, 817, 812, 807, 802, 797, 792, 787,
- 783, 778, 773, 769, 764, 760, 756, 751, 747, 743, 739, 734, 730,
- 726, 722, 718, 715, 711, 707, 703, 699, 696, 692, 688, 685, 681,
- 678, 674, 671, 667, 664, 661, 657, 654, 651, 648, 644, 641, 638,
- 635, 632, 629, 626, 623, 620, 617, 614, 611, 608, 605, 602, 599,
- 597, 594, 591, 588, 586, 583, 580, 578, 575, 572, 570, 567, 565,
- 562, 560, 557, 555, 552, 550, 547, 545, 542, 540, 538, 535, 533,
- 531, 528, 526, 524, 522, 519, 517, 515, 513, 510, 508, 506, 504,
- 502, 500, 498, 495, 493, 491, 489, 487, 485, 483, 481, 479, 477,
- 475, 473, 471, 469, 467, 465, 464, 462, 460, 458, 456, 454, 452,
- 450, 449, 447, 445, 443, 441, 440, 438, 436, 434, 433, 431, 429,
- 427, 426, 424, 422, 421, 419, 417, 416, 414, 412, 411, 409, 408,
- 406, 404, 403, 401, 400, 398, 396, 395, 393, 392, 390, 389, 387,
- 386, 384, 383, 381, 380, 378, 377, 375, 374, 372, 371, 370, 368,
- 367, 365, 364, 362, 361, 360, 358, 357, 355, 354, 353, 351, 350,
- 349, 347, 346, 345, 343, 342, 341, 339, 338, 337, 336, 334, 333,
- 332, 330, 329, 328, 327, 325, 324, 323, 322, 320, 319, 318, 317,
- 316, 314, 313, 312, 311, 310, 308, 307, 306, 305, 304, 303, 301,
- 300, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287,
- 286, 285, 284, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
- 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260,
- 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247,
- 246, 245, 244, 243, 242, 241, 240, 240, 239, 238, 237, 236, 235,
- 234, 233, 232, 231, 230, 230, 229, 228, 227, 226, 225, 224, 223,
- 222, 222, 221, 220, 219, 218, 217, 216, 216, 215, 214, 213, 212,
- 211, 211, 210, 209, 208, 207, 206, 206, 205, 204, 203, 202, 202,
- 201, 200, 199, 198, 198, 197, 196, 195, 195, 194, 193, 192, 191,
- 191, 190, 189, 188, 188, 187, 186, 185, 185, 184, 183, 182, 182,
- 181, 180, 180, 179, 178, 177, 177, 176, 175, 174, 174, 173, 172,
- 172, 171, 170, 170, 169, 168, 167, 167, 166, 165, 165, 164, 163,
- 163, 162, 161, 161, 160, 159, 159, 158, 157, 157, 156, 155, 155,
- 154, 153, 153, 152, 151, 151, 150, 150, 149, 148, 148, 147, 146,
- 146, 145, 145, 144, 143, 143, 142, 141, 141, 140, 140, 139, 138,
- 138, 137, 137, 136, 135, 135, 134, 134, 133, 133, 132, 131, 131,
- 130, 130, 129, 129, 128, 127, 127, 126, 126, 125, 125, 124, 123,
- 123, 122, 122, 121, 121, 120, 120, 119, 119, 118, 117, 117, 116,
- 116, 115, 115, 114, 114, 113, 113, 112, 112, 111, 111, 110, 110,
- 109, 109, 108, 108, 107, 107, 106, 106, 105, 105, 104, 104, 103,
- 103, 102, 102, 101, 101, 100, 100, 99, 99, 98, 98, 97, 97,
- 96, 96, 95, 95, 94, 94, 94, 93, 93, 92, 92, 91, 91,
- 90, 90, 89, 89, 89, 88, 88, 87, 87, 86, 86, 85, 85,
- 85, 84, 84, 83, 83, 82, 82, 82, 81, 81, 80, 80, 79,
- 79, 79, 78, 78, 77, 77, 77, 76, 76, 75, 75, 75, 74,
- 74, 73, 73, 73, 72, 72, 71, 71, 71, 70, 70, 69, 69,
- 69, 68, 68, 68, 67, 67, 66, 66, 66, 65, 65, 65, 64,
- 64, 63, 63, 63, 62, 62, 62, 61, 61, 61, 60, 60, 59,
- 59, 59, 58, 58, 58, 57, 57, 57, 56, 56, 56, 55, 55,
- 55, 54, 54, 54, 53, 53, 53, 52, 52, 52, 51, 51, 51,
- 50, 50, 50, 49, 49, 49, 49, 48, 48, 48, 47, 47, 47,
- 46, 46, 46, 45, 45, 45, 45, 44, 44, 44, 43, 43, 43,
- 43, 42, 42, 42, 41, 41, 41, 40, 40, 40, 40, 39, 39,
- 39, 39, 38, 38, 38, 37, 37, 37, 37, 36, 36, 36, 36,
- 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 33, 32, 32,
- 32, 32, 31, 31, 31, 31, 31, 30, 30, 30, 30, 29, 29,
- 29, 29, 28, 28, 28, 28, 27, 27, 27, 27, 27, 26, 26,
- 26, 26, 25, 25, 25, 25, 25, 24, 24, 24, 24, 23, 23,
- 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21,
- 20, 20, 20, 20, 20, 19, 19, 19, 19, 19, 19, 18, 18,
- 18, 18, 18, 17, 17, 17, 17, 17, 17, 16, 16, 16, 16,
- 16, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14,
- 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12,
- 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10,
- 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
-static const short lfo_freq_coeff[] = {
- 0, 3, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37,
- 40, 43, 46, 50, 53, 56, 59, 62, 65, 68, 71, 74, 78,
- 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 115, 118,
- 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157,
- 160, 163, 166, 169, 172, 175, 178, 180, 183, 186, 189, 192, 195,
- 198, 201, 204, 207, 209, 212, 215, 218, 221, 224, 226, 229, 232,
- 235, 238, 240, 243, 246, 249, 251, 254, 257, 260, 262, 265, 268,
- 270, 273, 276, 278, 281, 283, 286, 289, 291, 294, 296, 299, 301,
- 304, 306, 309, 311, 314, 316, 319, 321, 324, 326, 328, 331, 333,
- 336, 338, 340, 343, 345, 347, 350, 352, 354, 356, 359, 361, 363,
- 365, 367, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 391,
- 393, 395, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 415,
- 417, 419, 421, 423, 424, 426, 428, 430, 431, 433, 435, 436, 438,
- 439, 441, 443, 444, 446, 447, 449, 450, 452, 453, 455, 456, 457,
- 459, 460, 461, 463, 464, 465, 467, 468, 469, 470, 472, 473, 474,
- 475, 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 487, 488,
- 488, 489, 490, 491, 492, 493, 494, 494, 495, 496, 497, 497, 498,
- 499, 499, 500, 501, 501, 502, 502, 503, 504, 504, 504, 505, 505,
- 506, 506, 507, 507, 507, 508, 508, 508, 509, 509, 509, 509, 510,
- 510, 510, 510, 510, 510, 510, 510, 510, 510, 511, 510, 510, 510,
- 510, 510, 510, 510, 510, 510, 510, 509, 509, 509, 509, 508, 508,
- 508, 507, 507, 507, 506, 506, 505, 505, 504, 504, 504, 503, 502,
- 502, 501, 501, 500, 499, 499, 498, 497, 497, 496, 495, 494, 494,
- 493, 492, 491, 490, 489, 488, 488, 487, 486, 485, 484, 483, 482,
- 481, 480, 478, 477, 476, 475, 474, 473, 472, 470, 469, 468, 467,
- 465, 464, 463, 461, 460, 459, 457, 456, 455, 453, 452, 450, 449,
- 447, 446, 444, 443, 441, 439, 438, 436, 435, 433, 431, 430, 428,
- 426, 424, 423, 421, 419, 417, 415, 414, 412, 410, 408, 406, 404,
- 402, 400, 398, 396, 395, 393, 391, 388, 386, 384, 382, 380, 378,
- 376, 374, 372, 370, 367, 365, 363, 361, 359, 356, 354, 352, 350,
- 347, 345, 343, 340, 338, 336, 333, 331, 328, 326, 324, 321, 319,
- 316, 314, 311, 309, 306, 304, 301, 299, 296, 294, 291, 289, 286,
- 283, 281, 278, 276, 273, 270, 268, 265, 262, 260, 257, 254, 251,
- 249, 246, 243, 240, 238, 235, 232, 229, 226, 224, 221, 218, 215,
- 212, 209, 207, 204, 201, 198, 195, 192, 189, 186, 183, 180, 178,
- 175, 172, 169, 166, 163, 160, 157, 154, 151, 148, 145, 142, 139,
- 136, 133, 130, 127, 124, 121, 118, 115, 111, 108, 105, 102, 99,
- 96, 93, 90, 87, 84, 81, 78, 74, 71, 68, 65, 62, 59,
- 56, 53, 50, 46, 43, 40, 37, 34, 31, 28, 25, 21, 18,
- 15, 12, 9, 6, 3, 0, -3, -6, -9, -12, -15, -18, -21,
- -25, -28, -31, -34, -37, -40, -43, -46, -50, -53, -56, -59, -62,
- -65, -68, -71, -74, -78, -81, -84, -87, -90, -93, -96, -99, -102,
- -105, -108, -111, -115, -118, -121, -124, -127, -130, -133, -136, -139, -142,
- -145, -148, -151, -154, -157, -160, -163, -166, -169, -172, -175, -178, -180,
- -183, -186, -189, -192, -195, -198, -201, -204, -207, -209, -212, -215, -218,
- -221, -224, -226, -229, -232, -235, -238, -240, -243, -246, -249, -251, -254,
- -257, -260, -262, -265, -268, -270, -273, -276, -278, -281, -283, -286, -289,
- -291, -294, -296, -299, -301, -304, -306, -309, -311, -314, -316, -319, -321,
- -324, -326, -328, -331, -333, -336, -338, -340, -343, -345, -347, -350, -352,
- -354, -356, -359, -361, -363, -365, -367, -370, -372, -374, -376, -378, -380,
- -382, -384, -386, -388, -391, -393, -395, -396, -398, -400, -402, -404, -406,
- -408, -410, -412, -414, -415, -417, -419, -421, -423, -424, -426, -428, -430,
- -431, -433, -435, -436, -438, -439, -441, -443, -444, -446, -447, -449, -450,
- -452, -453, -455, -456, -457, -459, -460, -461, -463, -464, -465, -467, -468,
- -469, -470, -472, -473, -474, -475, -476, -477, -478, -480, -481, -482, -483,
- -484, -485, -486, -487, -488, -488, -489, -490, -491, -492, -493, -494, -494,
- -495, -496, -497, -497, -498, -499, -499, -500, -501, -501, -502, -502, -503,
- -504, -504, -504, -505, -505, -506, -506, -507, -507, -507, -508, -508, -508,
- -509, -509, -509, -509, -510, -510, -510, -510, -510, -510, -510, -510, -510,
- -510, -511, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -509,
- -509, -509, -509, -508, -508, -508, -507, -507, -507, -506, -506, -505, -505,
- -504, -504, -504, -503, -502, -502, -501, -501, -500, -499, -499, -498, -497,
- -497, -496, -495, -494, -494, -493, -492, -491, -490, -489, -488, -488, -487,
- -486, -485, -484, -483, -482, -481, -480, -478, -477, -476, -475, -474, -473,
- -472, -470, -469, -468, -467, -465, -464, -463, -461, -460, -459, -457, -456,
- -455, -453, -452, -450, -449, -447, -446, -444, -443, -441, -439, -438, -436,
- -435, -433, -431, -430, -428, -426, -424, -423, -421, -419, -417, -415, -414,
- -412, -410, -408, -406, -404, -402, -400, -398, -396, -395, -393, -391, -388,
- -386, -384, -382, -380, -378, -376, -374, -372, -370, -367, -365, -363, -361,
- -359, -356, -354, -352, -350, -347, -345, -343, -340, -338, -336, -333, -331,
- -328, -326, -324, -321, -319, -316, -314, -311, -309, -306, -304, -301, -299,
- -296, -294, -291, -289, -286, -283, -281, -278, -276, -273, -270, -268, -265,
- -262, -260, -257, -254, -251, -249, -246, -243, -240, -238, -235, -232, -229,
- -226, -224, -221, -218, -215, -212, -209, -207, -204, -201, -198, -195, -192,
- -189, -186, -183, -180, -178, -175, -172, -169, -166, -163, -160, -157, -154,
- -151, -148, -145, -142, -139, -136, -133, -130, -127, -124, -121, -118, -115,
- -111, -108, -105, -102, -99, -96, -93, -90, -87, -84, -81, -78, -74,
- -71, -68, -65, -62, -59, -56, -53, -50, -46, -43, -40, -37, -34,
- -31, -28, -25, -21, -18, -15, -12, -9, -6, -3
-};
-
-static const short lfo_env_coeff[] = {
- 251, 253, 254, 256, 257, 259, 260, 262, 264, 265, 267, 268, 270,
- 271, 273, 274, 276, 277, 279, 281, 282, 284, 285, 287, 288, 290,
- 291, 293, 294, 296, 297, 299, 300, 302, 303, 305, 306, 308, 309,
- 311, 312, 314, 315, 317, 318, 320, 321, 323, 324, 326, 327, 329,
- 330, 332, 333, 335, 336, 337, 339, 340, 342, 343, 345, 346, 348,
- 349, 350, 352, 353, 355, 356, 357, 359, 360, 362, 363, 364, 366,
- 367, 369, 370, 371, 373, 374, 375, 377, 378, 379, 381, 382, 383,
- 385, 386, 387, 389, 390, 391, 392, 394, 395, 396, 397, 399, 400,
- 401, 402, 404, 405, 406, 407, 409, 410, 411, 412, 413, 414, 416,
- 417, 418, 419, 420, 421, 423, 424, 425, 426, 427, 428, 429, 430,
- 431, 432, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
- 445, 446, 447, 448, 449, 450, 451, 452, 453, 453, 454, 455, 456,
- 457, 458, 459, 460, 461, 461, 462, 463, 464, 465, 466, 466, 467,
- 468, 469, 469, 470, 471, 472, 473, 473, 474, 475, 475, 476, 477,
- 477, 478, 479, 479, 480, 481, 481, 482, 483, 483, 484, 484, 485,
- 486, 486, 487, 487, 488, 488, 489, 489, 490, 490, 491, 491, 492,
- 492, 493, 493, 493, 494, 494, 495, 495, 495, 496, 496, 497, 497,
- 497, 498, 498, 498, 498, 499, 499, 499, 500, 500, 500, 500, 500,
- 501, 501, 501, 501, 501, 502, 502, 502, 502, 502, 502, 502, 502,
- 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
- 503, 503, 503, 503, 503, 503, 502, 502, 502, 502, 502, 502, 502,
- 502, 501, 501, 501, 501, 501, 500, 500, 500, 500, 500, 499, 499,
- 499, 498, 498, 498, 498, 497, 497, 497, 496, 496, 495, 495, 495,
- 494, 494, 493, 493, 493, 492, 492, 491, 491, 490, 490, 489, 489,
- 488, 488, 487, 487, 486, 486, 485, 484, 484, 483, 483, 482, 481,
- 481, 480, 479, 479, 478, 477, 477, 476, 475, 475, 474, 473, 473,
- 472, 471, 470, 469, 469, 468, 467, 466, 466, 465, 464, 463, 462,
- 461, 461, 460, 459, 458, 457, 456, 455, 454, 453, 453, 452, 451,
- 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438,
- 437, 436, 435, 434, 432, 431, 430, 429, 428, 427, 426, 425, 424,
- 423, 421, 420, 419, 418, 417, 416, 414, 413, 412, 411, 410, 409,
- 407, 406, 405, 404, 402, 401, 400, 399, 397, 396, 395, 394, 392,
- 391, 390, 389, 387, 386, 385, 383, 382, 381, 379, 378, 377, 375,
- 374, 373, 371, 370, 369, 367, 366, 364, 363, 362, 360, 359, 357,
- 356, 355, 353, 352, 350, 349, 348, 346, 345, 343, 342, 340, 339,
- 337, 336, 335, 333, 332, 330, 329, 327, 326, 324, 323, 321, 320,
- 318, 317, 315, 314, 312, 311, 309, 308, 306, 305, 303, 302, 300,
- 299, 297, 296, 294, 293, 291, 290, 288, 287, 285, 284, 282, 281,
- 279, 277, 276, 274, 273, 271, 270, 268, 267, 265, 264, 262, 260,
- 259, 257, 256, 254, 253, 251, 250, 248, 247, 245, 244, 242, 240,
- 239, 237, 236, 234, 233, 231, 230, 228, 227, 225, 223, 222, 220,
- 219, 217, 216, 214, 213, 211, 210, 208, 207, 205, 204, 202, 201,
- 199, 198, 196, 195, 193, 192, 190, 189, 187, 186, 184, 183, 181,
- 180, 178, 177, 175, 174, 172, 171, 169, 168, 166, 165, 164, 162,
- 161, 159, 158, 156, 155, 153, 152, 151, 149, 148, 146, 145, 144,
- 142, 141, 139, 138, 137, 135, 134, 133, 131, 130, 129, 127, 126,
- 124, 123, 122, 120, 119, 118, 117, 115, 114, 113, 111, 110, 109,
- 108, 106, 105, 104, 103, 101, 100, 99, 98, 96, 95, 94, 93,
- 92, 90, 89, 88, 87, 86, 84, 83, 82, 81, 80, 79, 78,
- 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64,
- 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51,
- 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 40, 39,
- 39, 38, 37, 36, 35, 35, 34, 33, 32, 31, 31, 30, 29,
- 29, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 20,
- 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13,
- 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7,
- 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3,
- 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
- 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6,
- 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11,
- 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18,
- 19, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26,
- 27, 28, 29, 29, 30, 31, 31, 32, 33, 34, 35, 35, 36,
- 37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88,
- 89, 90, 92, 93, 94, 95, 96, 98, 99, 100, 101, 103, 104,
- 105, 106, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 120,
- 122, 123, 124, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138,
- 139, 141, 142, 144, 145, 146, 148, 149, 151, 152, 153, 155, 156,
- 158, 159, 161, 162, 164, 165, 166, 168, 169, 171, 172, 174, 175,
- 177, 178, 180, 181, 183, 184, 186, 187, 189, 190, 192, 193, 195,
- 196, 198, 199, 201, 202, 204, 205, 207, 208, 210, 211, 213, 214,
- 216, 217, 219, 220, 222, 223, 225, 227, 228, 230, 231, 233, 234,
- 236, 237, 239, 240, 242, 244, 245, 247, 248, 250
-};
-
-#endif
+#ifndef _EMUTABLES_H_ +#define _EMUTABLES_H_ + +/* Precompiled ym2612 tables for use in Rockbox */ + +static const int tl_coeff[] = { + 268435455, 267712100, 266990695, 266271234, 265553712, 264838123, 264124462, 263412725, 262702906, 261994999, 261289000, + 260584903, 259882704, 259182396, 258483976, 257787438, 257092777, 256399988, 255709066, 255020006, 254332802, 253647450, + 252963945, 252282282, 251602456, 250924462, 250248294, 249573949, 248901421, 248230705, 247561797, 246894691, 246229383, + 245565867, 244904140, 244244195, 243586029, 242929637, 242275013, 241622154, 240971053, 240321708, 239674112, 239028261, + 238384150, 237741775, 237101131, 236462214, 235825018, 235189539, 234555773, 233923714, 233293359, 232664702, 232037740, + 231412466, 230788878, 230166970, 229546738, 228928178, 228311284, 227696052, 227082479, 226470558, 225860287, 225251660, + 224644674, 224039323, 223435603, 222833510, 222233039, 221634187, 221036948, 220441319, 219847295, 219254871, 218664044, + 218074809, 217487162, 216901098, 216316614, 215733704, 215152366, 214572594, 213994384, 213417732, 212842635, 212269087, + 211697084, 211126623, 210557699, 209990308, 209424446, 208860109, 208297293, 207735993, 207176206, 206617927, 206061153, + 205505879, 204952102, 204399816, 203849019, 203299706, 202751873, 202205517, 201660633, 201117217, 200575266, 200034774, + 199495740, 198958158, 198422024, 197887335, 197354088, 196822277, 196291899, 195762950, 195235427, 194709325, 194184641, + 193661370, 193139510, 192619056, 192100005, 191582352, 191066094, 190551228, 190037748, 189525653, 189014937, 188505598, + 187997631, 187491033, 186985800, 186481928, 185979414, 185478255, 184978446, 184479983, 183982864, 183487085, 182992641, + 182499530, 182007748, 181517291, 181028155, 180540338, 180053835, 179568643, 179084759, 178602178, 178120898, 177640915, + 177162225, 176684825, 176208712, 175733881, 175260330, 174788055, 174317053, 173847320, 173378853, 172911648, 172445702, + 171981012, 171517574, 171055385, 170594441, 170134740, 169676277, 169219049, 168763054, 168308287, 167854746, 167402427, + 166951327, 166501443, 166052770, 165605307, 165159050, 164713995, 164270139, 163827480, 163386013, 162945736, 162506646, + 162068738, 161632011, 161196460, 160762083, 160328877, 159896838, 159465963, 159036250, 158607694, 158180293, 157754044, + 157328943, 156904988, 156482176, 156060502, 155639965, 155220562, 154802288, 154385142, 153969119, 153554218, 153140435, + 152727766, 152316210, 151905763, 151496422, 151088184, 150681046, 150275005, 149870058, 149466203, 149063435, 148661753, + 148261154, 147861634, 147463190, 147065821, 146669522, 146274291, 145880125, 145487021, 145094976, 144703988, 144314054, + 143925170, 143537334, 143150543, 142764795, 142380086, 141996414, 141613775, 141232168, 140851589, 140472035, 140093505, + 139715994, 139339501, 138964022, 138589555, 138216097, 137843646, 137472198, 137101751, 136732302, 136363849, 135996388, + 135629918, 135264436, 134899938, 134536423, 134173887, 133812328, 133451743, 133092130, 132733486, 132375808, 132019095, + 131663342, 131308548, 130954711, 130601826, 130249893, 129898908, 129548869, 129199773, 128851618, 128504401, 128158119, + 127812771, 127468353, 127124864, 126782300, 126440659, 126099939, 125760137, 125421250, 125083277, 124746214, 124410060, + 124074812, 123740467, 123407023, 123074477, 122742828, 122412072, 122082208, 121753232, 121425143, 121097939, 120771615, + 120446172, 120121605, 119797912, 119475092, 119153142, 118832060, 118511843, 118192488, 117873994, 117556359, 117239579, + 116923653, 116608578, 116294353, 115980974, 115668439, 115356747, 115045894, 114735880, 114426700, 114118354, 113810839, + 113504152, 113198292, 112893256, 112589042, 112285648, 111983071, 111681310, 111380362, 111080225, 110780896, 110482375, + 110184657, 109887742, 109591627, 109296310, 109001789, 108708061, 108415125, 108122978, 107831619, 107541044, 107251253, + 106962243, 106674011, 106386556, 106099876, 105813968, 105528830, 105244461, 104960859, 104678020, 104395944, 104114628, + 103834069, 103554267, 103275219, 102996923, 102719377, 102442578, 102166526, 101891217, 101616650, 101342823, 101069734, + 100797381, 100525762, 100254875, 99984718, 99715288, 99446585, 99178606, 98911349, 98644812, 98378993, 98113891, + 97849503, 97585828, 97322863, 97060606, 96799057, 96538212, 96278070, 96018629, 95759887, 95501842, 95244493, + 94987837, 94731873, 94476599, 94222012, 93968112, 93714895, 93462361, 93210508, 92959333, 92708835, 92459012, + 92209863, 91961384, 91713575, 91466434, 91219959, 90974149, 90729000, 90484512, 90240683, 89997511, 89754994, + 89513131, 89271920, 89031358, 88791445, 88552178, 88313556, 88075578, 87838240, 87601542, 87365481, 87130057, + 86895267, 86661110, 86427584, 86194687, 85962418, 85730775, 85499756, 85269359, 85039583, 84810427, 84581888, + 84353965, 84126656, 83899959, 83673874, 83448397, 83223528, 82999266, 82775607, 82552551, 82330096, 82108241, + 81886984, 81666322, 81446256, 81226782, 81007900, 80789608, 80571904, 80354786, 80138254, 79922305, 79706938, + 79492151, 79277943, 79064313, 78851258, 78638777, 78426868, 78215531, 78004763, 77794564, 77584930, 77375862, + 77167357, 76959413, 76752031, 76545207, 76338940, 76133229, 75928072, 75723469, 75519416, 75315914, 75112960, + 74910552, 74708690, 74507373, 74306597, 74106363, 73906668, 73707512, 73508892, 73310807, 73113256, 72916237, + 72719749, 72523791, 72328361, 72133457, 71939079, 71745225, 71551892, 71359081, 71166789, 70975016, 70783759, + 70593018, 70402791, 70213076, 70023872, 69835179, 69646994, 69459315, 69272143, 69085475, 68899310, 68713647, + 68528484, 68343820, 68159653, 67975983, 67792808, 67610127, 67427937, 67246239, 67065030, 66884310, 66704076, + 66524328, 66345065, 66166285, 65987986, 65810168, 65632829, 65455968, 65279583, 65103674, 64928239, 64753277, + 64578786, 64404765, 64231213, 64058129, 63885511, 63713359, 63541670, 63370444, 63199679, 63029375, 62859529, + 62690141, 62521210, 62352734, 62184711, 62017142, 61850024, 61683357, 61517138, 61351368, 61186044, 61021166, + 60856731, 60692741, 60529192, 60366083, 60203414, 60041184, 59879391, 59718034, 59557111, 59396622, 59236566, + 59076941, 58917746, 58758980, 58600642, 58442730, 58285245, 58128183, 57971545, 57815329, 57659533, 57504158, + 57349201, 57194662, 57040539, 56886832, 56733539, 56580659, 56428190, 56276133, 56124486, 55973247, 55822415, + 55671990, 55521971, 55372355, 55223143, 55074333, 54925924, 54777915, 54630305, 54483092, 54336276, 54189856, + 54043830, 53898198, 53752959, 53608110, 53463652, 53319583, 53175903, 53032610, 52889702, 52747180, 52605042, + 52463287, 52321914, 52180922, 52040310, 51900076, 51760221, 51620743, 51481640, 51342912, 51204558, 51066577, + 50928968, 50791729, 50654860, 50518360, 50382228, 50246463, 50111064, 49976029, 49841359, 49707051, 49573105, + 49439520, 49306295, 49173429, 49040922, 48908771, 48776976, 48645537, 48514451, 48383719, 48253339, 48123311, + 47993633, 47864304, 47735324, 47606691, 47478405, 47350465, 47222869, 47095618, 46968709, 46842142, 46715916, + 46590031, 46464484, 46339276, 46214406, 46089871, 45965673, 45841809, 45718279, 45595082, 45472216, 45349682, + 45227478, 45105603, 44984057, 44862838, 44741946, 44621380, 44501139, 44381221, 44261627, 44142355, 44023404, + 43904774, 43786464, 43668472, 43550798, 43433442, 43316402, 43199677, 43083266, 42967170, 42851386, 42735914, + 42620753, 42505903, 42391362, 42277130, 42163206, 42049588, 41936277, 41823271, 41710570, 41598172, 41486077, + 41374285, 41262793, 41151602, 41040711, 40930118, 40819823, 40709826, 40600125, 40490720, 40381609, 40272793, + 40164269, 40056039, 39948099, 39840451, 39733093, 39626024, 39519243, 39412751, 39306545, 39200625, 39094991, + 38989642, 38884576, 38779794, 38675294, 38571075, 38467138, 38363480, 38260102, 38157002, 38054180, 37951635, + 37849367, 37747374, 37645656, 37544212, 37443042, 37342144, 37241518, 37141163, 37041078, 36941264, 36841718, + 36742440, 36643430, 36544687, 36446210, 36347998, 36250051, 36152368, 36054948, 35957790, 35860895, 35764260, + 35667886, 35571772, 35475916, 35380319, 35284980, 35189897, 35095071, 35000500, 34906184, 34812122, 34718314, + 34624758, 34531454, 34438402, 34345601, 34253050, 34160748, 34068695, 33976890, 33885332, 33794021, 33702956, + 33612137, 33521562, 33431231, 33341144, 33251299, 33161697, 33072336, 32983216, 32894336, 32805695, 32717294, + 32629130, 32541204, 32453515, 32366063, 32278846, 32191864, 32105116, 32018602, 31932322, 31846273, 31760457, + 31674872, 31589518, 31504393, 31419498, 31334832, 31250394, 31166183, 31082200, 30998442, 30914911, 30831604, + 30748522, 30665664, 30583029, 30500617, 30418426, 30336458, 30254710, 30173183, 30091875, 30010786, 29929916, + 29849263, 29768829, 29688610, 29608608, 29528822, 29449250, 29369893, 29290750, 29211820, 29133103, 29054598, + 28976304, 28898222, 28820350, 28742687, 28665234, 28587990, 28510954, 28434125, 28357503, 28281088, 28204879, + 28128875, 28053076, 27977482, 27902091, 27826903, 27751917, 27677134, 27602552, 27528172, 27453991, 27380011, + 27306230, 27232648, 27159264, 27086078, 27013089, 26940296, 26867700, 26795300, 26723094, 26651083, 26579267, + 26507643, 26436213, 26364975, 26293929, 26223075, 26152412, 26081939, 26011656, 25941562, 25871657, 25801940, + 25732412, 25663071, 25593916, 25524948, 25456166, 25387569, 25319157, 25250929, 25182886, 25115025, 25047348, + 24979852, 24912539, 24845407, 24778456, 24711686, 24645095, 24578684, 24512451, 24446397, 24380522, 24314823, + 24249302, 24183957, 24118789, 24053796, 23988978, 23924335, 23859866, 23795570, 23731448, 23667499, 23603722, + 23540117, 23476683, 23413421, 23350328, 23287406, 23224653, 23162070, 23099655, 23037408, 22975329, 22913417, + 22851673, 22790094, 22728681, 22667434, 22606352, 22545435, 22484682, 22424092, 22363666, 22303402, 22243301, + 22183362, 22123584, 22063968, 22004512, 21945216, 21886080, 21827104, 21768286, 21709627, 21651126, 21592783, + 21534597, 21476567, 21418694, 21360977, 21303416, 21246009, 21188758, 21131660, 21074717, 21017926, 20961289, + 20904805, 20848473, 20792292, 20736263, 20680385, 20624657, 20569080, 20513652, 20458374, 20403245, 20348264, + 20293432, 20238747, 20184209, 20129819, 20075575, 20021477, 19967525, 19913719, 19860057, 19806540, 19753167, + 19699938, 19646853, 19593910, 19541111, 19488453, 19435937, 19383563, 19331330, 19279238, 19227286, 19175474, + 19123802, 19072269, 19020875, 18969619, 18918502, 18867522, 18816680, 18765974, 18715405, 18664973, 18614676, + 18564515, 18514489, 18464598, 18414842, 18365219, 18315730, 18266375, 18217152, 18168062, 18119105, 18070279, + 18021585, 17973022, 17924590, 17876289, 17828118, 17780076, 17732164, 17684381, 17636727, 17589201, 17541803, + 17494533, 17447391, 17400375, 17353486, 17306724, 17260087, 17213577, 17167191, 17120930, 17074795, 17028783, + 16982896, 16937132, 16891491, 16845974, 16800579, 16755306, 16710155, 16665126, 16620219, 16575432, 16530766, + 16486221, 16441795, 16397490, 16353303, 16309236, 16265287, 16221457, 16177745, 16134151, 16090674, 16047314, + 16004072, 15960945, 15917935, 15875041, 15832263, 15789599, 15747051, 15704617, 15662298, 15620093, 15578001, + 15536023, 15494158, 15452406, 15410766, 15369239, 15327823, 15286519, 15245327, 15204245, 15163274, 15122414, + 15081663, 15041023, 15000491, 14960070, 14919757, 14879552, 14839456, 14799468, 14759588, 14719815, 14680150, + 14640591, 14601139, 14561793, 14522554, 14483420, 14444391, 14405468, 14366649, 14327935, 14289326, 14250820, + 14212418, 14174120, 14135925, 14097833, 14059843, 14021956, 13984171, 13946488, 13908906, 13871426, 13834047, + 13796768, 13759590, 13722512, 13685534, 13648655, 13611876, 13575196, 13538615, 13502132, 13465748, 13429462, + 13393273, 13357183, 13321189, 13285292, 13249492, 13213789, 13178182, 13142670, 13107255, 13071934, 13036709, + 13001579, 12966544, 12931603, 12896756, 12862003, 12827344, 12792778, 12758305, 12723925, 12689638, 12655443, + 12621341, 12587330, 12553411, 12519583, 12485846, 12452201, 12418646, 12385181, 12351807, 12318522, 12285327, + 12252222, 12219206, 12186279, 12153440, 12120690, 12088029, 12055455, 12022969, 11990571, 11958260, 11926036, + 11893899, 11861848, 11829884, 11798006, 11766214, 11734507, 11702886, 11671350, 11639900, 11608533, 11577252, + 11546055, 11514941, 11483912, 11452966, 11422104, 11391325, 11360628, 11330015, 11299484, 11269035, 11238668, + 11208384, 11178180, 11148058, 11118018, 11088058, 11058179, 11028380, 10998662, 10969024, 10939466, 10909987, + 10880588, 10851268, 10822027, 10792865, 10763781, 10734776, 10705849, 10677000, 10648228, 10619535, 10590918, + 10562379, 10533916, 10505530, 10477221, 10448988, 10420831, 10392750, 10364745, 10336815, 10308960, 10281180, + 10253476, 10225846, 10198290, 10170809, 10143401, 10116068, 10088808, 10061622, 10034509, 10007468, 9980501, + 9953607, 9926785, 9900035, 9873357, 9846752, 9820217, 9793755, 9767364, 9741043, 9714794, 9688616, + 9662508, 9636470, 9610503, 9584605, 9558778, 9533019, 9507331, 9481711, 9456161, 9430679, 9405266, + 9379922, 9354646, 9329438, 9304298, 9279225, 9254221, 9229283, 9204413, 9179610, 9154874, 9130204, + 9105601, 9081064, 9056593, 9032188, 9007849, 8983576, 8959368, 8935225, 8911147, 8887134, 8863186, + 8839302, 8815483, 8791728, 8768037, 8744409, 8720846, 8697346, 8673909, 8650535, 8627225, 8603977, + 8580792, 8557669, 8534608, 8511610, 8488674, 8465799, 8442987, 8420235, 8397545, 8374916, 8352348, + 8329841, 8307395, 8285009, 8262683, 8240418, 8218212, 8196067, 8173981, 8151954, 8129987, 8108079, + 8086230, 8064440, 8042709, 8021036, 7999422, 7977866, 7956368, 7934928, 7913545, 7892221, 7870954, + 7849744, 7828591, 7807495, 7786456, 7765474, 7744548, 7723679, 7702866, 7682109, 7661408, 7640763, + 7620173, 7599639, 7579160, 7558737, 7538368, 7518055, 7497796, 7477591, 7457441, 7437346, 7417304, + 7397317, 7377383, 7357503, 7337677, 7317904, 7298185, 7278518, 7258905, 7239344, 7219836, 7200381, + 7180978, 7161627, 7142329, 7123082, 7103888, 7084745, 7065654, 7046614, 7027625, 7008688, 6989802, + 6970966, 6952181, 6933447, 6914764, 6896130, 6877547, 6859014, 6840531, 6822098, 6803715, 6785381, + 6767096, 6748861, 6730675, 6712537, 6694449, 6676410, 6658419, 6640476, 6622582, 6604736, 6586938, + 6569188, 6551486, 6533832, 6516225, 6498666, 6481154, 6463689, 6446272, 6428901, 6411577, 6394299, + 6377069, 6359884, 6342746, 6325655, 6308609, 6291609, 6274655, 6257747, 6240884, 6224066, 6207294, + 6190568, 6173886, 6157249, 6140657, 6124110, 6107607, 6091149, 6074735, 6058365, 6042040, 6025758, + 6009521, 5993327, 5977177, 5961070, 5945007, 5928987, 5913010, 5897076, 5881185, 5865337, 5849532, + 5833769, 5818049, 5802371, 5786735, 5771141, 5755590, 5740080, 5724612, 5709186, 5693802, 5678459, + 5663157, 5647896, 5632677, 5617498, 5602361, 5587264, 5572208, 5557193, 5542218, 5527283, 5512389, + 5497534, 5482720, 5467946, 5453211, 5438517, 5423861, 5409246, 5394669, 5380132, 5365635, 5351176, + 5336756, 5322375, 5308033, 5293729, 5279464, 5265237, 5251049, 5236899, 5222787, 5208713, 5194677, + 5180679, 5166719, 5152796, 5138911, 5125063, 5111252, 5097479, 5083743, 5070044, 5056382, 5042756, + 5029167, 5015615, 5002100, 4988620, 4975178, 4961771, 4948400, 4935066, 4921767, 4908505, 4895278, + 4882086, 4868931, 4855810, 4842725, 4829676, 4816661, 4803682, 4790737, 4777827, 4764953, 4752112, + 4739307, 4726536, 4713799, 4701097, 4688429, 4675795, 4663195, 4650629, 4638097, 4625599, 4613134, + 4600703, 4588306, 4575941, 4563611, 4551313, 4539049, 4526817, 4514619, 4502453, 4490320, 4478220, + 4466153, 4454118, 4442115, 4430145, 4418207, 4406301, 4394428, 4382586, 4370776, 4358998, 4347252, + 4335538, 4323855, 4312203, 4300583, 4288994, 4277437, 4265910, 4254415, 4242950, 4231517, 4220114, + 4208742, 4197401, 4186090, 4174810, 4163560, 4152340, 4141151, 4129992, 4118863, 4107764, 4096694, + 4085655, 4074645, 4063665, 4052715, 4041794, 4030903, 4020041, 4009208, 3998404, 3987630, 3976884, + 3966168, 3955480, 3944821, 3934191, 3923590, 3913017, 3902472, 3891956, 3881469, 3871009, 3860578, + 3850175, 3839800, 3829453, 3819133, 3808842, 3798578, 3788342, 3778134, 3767953, 3757799, 3747673, + 3737574, 3727503, 3717458, 3707441, 3697450, 3687487, 3677550, 3667640, 3657757, 3647900, 3638070, + 3628267, 3618490, 3608739, 3599014, 3589316, 3579644, 3569998, 3560378, 3550783, 3541215, 3531673, + 3522156, 3512665, 3503199, 3493759, 3484344, 3474955, 3465591, 3456252, 3446939, 3437650, 3428387, + 3419148, 3409935, 3400746, 3391582, 3382443, 3373328, 3364238, 3355172, 3346131, 3337114, 3328122, + 3319153, 3310209, 3301289, 3292393, 3283521, 3274673, 3265849, 3257048, 3248271, 3239518, 3230789, + 3222083, 3213400, 3204741, 3196105, 3187493, 3178903, 3170337, 3161794, 3153274, 3144777, 3136302, + 3127851, 3119422, 3111016, 3102633, 3094272, 3085934, 3077619, 3069325, 3061054, 3052806, 3044579, + 3036375, 3028193, 3020033, 3011895, 3003779, 2995684, 2987612, 2979561, 2971532, 2963525, 2955539, + 2947575, 2939632, 2931710, 2923810, 2915931, 2908074, 2900237, 2892422, 2884628, 2876855, 2869102, + 2861371, 2853660, 2845971, 2838302, 2830653, 2823025, 2815418, 2807832, 2800265, 2792719, 2785194, + 2777689, 2770203, 2762739, 2755294, 2747869, 2740464, 2733080, 2725715, 2718370, 2711045, 2703739, + 2696453, 2689187, 2681941, 2674714, 2667506, 2660318, 2653149, 2646000, 2638870, 2631759, 2624667, + 2617594, 2610540, 2603506, 2596490, 2589493, 2582515, 2575556, 2568616, 2561694, 2554791, 2547907, + 2541041, 2534194, 2527365, 2520554, 2513762, 2506988, 2500233, 2493495, 2486776, 2480075, 2473392, + 2466727, 2460080, 2453450, 2446839, 2440246, 2433670, 2427112, 2420571, 2414049, 2407544, 2401056, + 2394586, 2388133, 2381698, 2375280, 2368879, 2362496, 2356130, 2349780, 2343448, 2337134, 2330836, + 2324555, 2318291, 2312044, 2305813, 2299600, 2293403, 2287223, 2281060, 2274913, 2268783, 2262669, + 2256572, 2250491, 2244427, 2238379, 2232347, 2226331, 2220332, 2214349, 2208382, 2202431, 2196496, + 2190577, 2184674, 2178787, 2172916, 2167060, 2161221, 2155397, 2149589, 2143796, 2138019, 2132258, + 2126512, 2120782, 2115067, 2109368, 2103683, 2098015, 2092361, 2086723, 2081100, 2075492, 2069899, + 2064321, 2058758, 2053211, 2047678, 2042160, 2036657, 2031169, 2025695, 2020237, 2014793, 2009364, + 2003949, 1998549, 1993163, 1987792, 1982436, 1977094, 1971766, 1966453, 1961154, 1955869, 1950599, + 1945342, 1940100, 1934872, 1929658, 1924458, 1919272, 1914101, 1908943, 1903799, 1898668, 1893552, + 1888450, 1883361, 1878286, 1873224, 1868176, 1863142, 1858122, 1853115, 1848121, 1843141, 1838174, + 1833221, 1828281, 1823354, 1818441, 1813540, 1808654, 1803780, 1798919, 1794072, 1789237, 1784416, + 1779607, 1774812, 1770029, 1765259, 1760502, 1755758, 1751027, 1746309, 1741603, 1736910, 1732229, + 1727561, 1722906, 1718263, 1713633, 1709015, 1704410, 1699817, 1695237, 1690669, 1686113, 1681569, + 1677038, 1672519, 1668012, 1663517, 1659034, 1654564, 1650105, 1645659, 1641224, 1636801, 1632391, + 1627992, 1623605, 1619230, 1614866, 1610515, 1606175, 1601847, 1597530, 1593225, 1588932, 1584650, + 1580380, 1576122, 1571874, 1567639, 1563414, 1559201, 1555000, 1550810, 1546631, 1542463, 1538306, + 1534161, 1530027, 1525904, 1521792, 1517691, 1513602, 1509523, 1505455, 1501399, 1497353, 1493318, + 1489294, 1485281, 1481278, 1477287, 1473306, 1469336, 1465376, 1461427, 1457489, 1453562, 1449645, + 1445738, 1441843, 1437957, 1434082, 1430218, 1426364, 1422520, 1418687, 1414864, 1411051, 1407249, + 1403457, 1399675, 1395903, 1392142, 1388390, 1384649, 1380918, 1377197, 1373486, 1369784, 1366093, + 1362412, 1358741, 1355079, 1351428, 1347786, 1344154, 1340532, 1336920, 1333317, 1329724, 1326141, + 1322567, 1319004, 1315449, 1311904, 1308369, 1304844, 1301327, 1297821, 1294323, 1290836, 1287357, + 1283888, 1280429, 1276978, 1273537, 1270105, 1266683, 1263269, 1259865, 1256470, 1253084, 1249708, + 1246340, 1242982, 1239632, 1236292, 1232960, 1229638, 1226324, 1223020, 1219724, 1216437, 1213159, + 1209890, 1206630, 1203378, 1200136, 1196902, 1193676, 1190460, 1187252, 1184052, 1180862, 1177680, + 1174506, 1171341, 1168185, 1165037, 1161897, 1158767, 1155644, 1152530, 1149424, 1146327, 1143238, + 1140157, 1137085, 1134021, 1130965, 1127917, 1124878, 1121846, 1118823, 1115809, 1112802, 1109803, + 1106813, 1103830, 1100855, 1097889, 1094931, 1091980, 1089037, 1086103, 1083176, 1080257, 1077346, + 1074443, 1071548, 1068660, 1065781, 1062909, 1060044, 1057188, 1054339, 1051498, 1048664, 1045839, + 1043020, 1040210, 1037407, 1034611, 1031823, 1029043, 1026270, 1023504, 1020746, 1017996, 1015252, + 1012517, 1009788, 1007067, 1004353, 1001647, 998948, 996256, 993571, 990894, 988224, 985561, + 982905, 980256, 977615, 974980, 972353, 969733, 967120, 964514, 961915, 959323, 956737, + 954159, 951588, 949024, 946467, 943916, 941373, 938836, 936306, 933783, 931267, 928757, + 926254, 923758, 921269, 918787, 916311, 913842, 911379, 908923, 906474, 904031, 901595, + 899166, 896743, 894326, 891916, 889513, 887116, 884725, 882341, 879963, 877592, 875227, + 872869, 870517, 868171, 865831, 863498, 861171, 858851, 856536, 854228, 851926, 849631, + 847341, 845058, 842781, 840510, 838245, 835986, 833733, 831487, 829246, 827011, 824783, + 822560, 820344, 818133, 815929, 813730, 811537, 809350, 807169, 804994, 802825, 800662, + 798504, 796352, 794206, 792066, 789932, 787803, 785680, 783563, 781452, 779346, 777246, + 775151, 773062, 770979, 768902, 766830, 764763, 762703, 760647, 758598, 756553, 754515, + 752482, 750454, 748432, 746415, 744403, 742397, 740397, 738402, 736412, 734428, 732448, + 730475, 728506, 726543, 724585, 722633, 720686, 718744, 716807, 714875, 712949, 711028, + 709112, 707201, 705295, 703394, 701499, 699609, 697723, 695843, 693968, 692098, 690233, + 688373, 686518, 684668, 682823, 680983, 679148, 677318, 675493, 673673, 671857, 670047, + 668241, 666441, 664645, 662854, 661067, 659286, 657510, 655738, 653971, 652208, 650451, + 648698, 646950, 645207, 643468, 641734, 640005, 638280, 636560, 634845, 633134, 631428, + 629727, 628030, 626337, 624650, 622966, 621288, 619613, 617944, 616279, 614618, 612962, + 611310, 609663, 608020, 606381, 604747, 603118, 601492, 599872, 598255, 596643, 595035, + 593432, 591833, 590238, 588647, 587061, 585479, 583901, 582328, 580759, 579194, 577633, + 576076, 574524, 572976, 571432, 569892, 568356, 566825, 565297, 563774, 562255, 560740, + 559229, 557722, 556219, 554720, 553225, 551734, 550248, 548765, 547286, 545811, 544341, + 542874, 541411, 539952, 538497, 537046, 535599, 534155, 532716, 531280, 529849, 528421, + 526997, 525577, 524161, 522748, 521340, 519935, 518534, 517136, 515743, 514353, 512967, + 511585, 510206, 508831, 507460, 506093, 504729, 503369, 502012, 500660, 499310, 497965, + 496623, 495285, 493950, 492619, 491292, 489968, 488648, 487331, 486018, 484708, 483402, + 482099, 480800, 479504, 478212, 476924, 475638, 474357, 473078, 471804, 470532, 469264, + 468000, 466739, 465481, 464227, 462976, 461728, 460484, 459243, 458005, 456771, 455540, + 454313, 453089, 451868, 450650, 449436, 448225, 447017, 445812, 444611, 443413, 442218, + 441026, 439838, 438653, 437470, 436292, 435116, 433943, 432774, 431608, 430445, 429285, + 428128, 426974, 425824, 424676, 423532, 422391, 421252, 420117, 418985, 417856, 416730, + 415607, 414487, 413370, 412256, 411146, 410038, 408933, 407831, 406732, 405636, 404543, + 403453, 402365, 401281, 400200, 399121, 398046, 396973, 395903, 394837, 393773, 392712, + 391653, 390598, 389545, 388496, 387449, 386405, 385363, 384325, 383289, 382257, 381226, + 380199, 379175, 378153, 377134, 376118, 375104, 374093, 373085, 372080, 371077, 370077, + 369080, 368085, 367094, 366104, 365118, 364134, 363153, 362174, 361198, 360225, 359254, + 358286, 357321, 356358, 355397, 354440, 353485, 352532, 351582, 350635, 349690, 348748, + 347808, 346871, 345936, 345004, 344074, 343147, 342222, 341300, 340380, 339463, 338548, + 337636, 336726, 335819, 334914, 334011, 333111, 332214, 331318, 330426, 329535, 328647, + 327762, 326878, 325997, 325119, 324243, 323369, 322498, 321629, 320762, 319898, 319036, + 318176, 317319, 316463, 315611, 314760, 313912, 313066, 312222, 311381, 310542, 309705, + 308871, 308038, 307208, 306380, 305555, 304731, 303910, 303091, 302275, 301460, 300648, + 299838, 299030, 298224, 297420, 296619, 295819, 295022, 294227, 293434, 292644, 291855, + 291069, 290284, 289502, 288722, 287944, 287168, 286394, 285622, 284853, 284085, 283320, + 282556, 281795, 281035, 280278, 279523, 278770, 278018, 277269, 276522, 275777, 275034, + 274293, 273553, 272816, 272081, 271348, 270617, 269888, 269160, 268435, 267712, 266990, + 266271, 265553, 264838, 264124, 263412, 262702, 261994, 261289, 260584, 259882, 259182, + 258483, 257787, 257092, 256399, 255709, 255020, 254332, 253647, 252963, 252282, 251602, + 250924, 250248, 249573, 248901, 248230, 247561, 246894, 246229, 245565, 244904, 244244, + 243586, 242929, 242275, 241622, 240971, 240321, 239674, 239028, 238384, 237741, 237101, + 236462, 235825, 235189, 234555, 233923, 233293, 232664, 232037, 231412, 230788, 230166, + 229546, 228928, 228311, 227696, 227082, 226470, 225860, 225251, 224644, 224039, 223435, + 222833, 222233, 221634, 221036, 220441, 219847, 219254, 218664, 218074, 217487, 216901, + 216316, 215733, 215152, 214572, 213994, 213417, 212842, 212269, 211697, 211126, 210557, + 209990, 209424, 208860, 208297, 207735, 207176, 206617, 206061, 205505, 204952, 204399, + 203849, 203299, 202751, 202205, 201660, 201117, 200575, 200034, 199495, 198958, 198422, + 197887, 197354, 196822, 196291, 195762, 195235, 194709, 194184, 193661, 193139, 192619, + 192100, 191582, 191066, 190551, 190037, 189525, 189014, 188505, 187997, 187491, 186985, + 186481, 185979, 185478, 184978, 184479, 183982, 183487, 182992, 182499, 182007, 181517, + 181028, 180540, 180053, 179568, 179084, 178602, 178120, 177640, 177162, 176684, 176208, + 175733, 175260, 174788, 174317, 173847, 173378, 172911, 172445, 171981, 171517, 171055, + 170594, 170134, 169676, 169219, 168763, 168308, 167854, 167402, 166951, 166501, 166052, + 165605, 165159, 164713, 164270, 163827, 163386, 162945, 162506, 162068, 161632, 161196, + 160762, 160328, 159896, 159465, 159036, 158607, 158180, 157754, 157328, 156904, 156482, + 156060, 155639, 155220, 154802, 154385, 153969, 153554, 153140, 152727, 152316, 151905, + 151496, 151088, 150681, 150275, 149870, 149466, 149063, 148661, 148261, 147861, 147463, + 147065, 146669, 146274, 145880, 145487, 145094, 144703, 144314, 143925, 143537, 143150, + 142764, 142380, 141996, 141613, 141232, 140851, 140472, 140093, 139715, 139339, 138964, + 138589, 138216, 137843, 137472, 137101, 136732, 136363, 135996, 135629, 135264, 134899, + 134536, 134173, 133812, 133451, 133092, 132733, 132375, 132019, 131663, 131308, 130954, + 130601, 130249, 129898, 129548, 129199, 128851, 128504, 128158, 127812, 127468, 127124, + 126782, 126440, 126099, 125760, 125421, 125083, 124746, 124410, 124074, 123740, 123407, + 123074, 122742, 122412, 122082, 121753, 121425, 121097, 120771, 120446, 120121, 119797, + 119475, 119153, 118832, 118511, 118192, 117873, 117556, 117239, 116923, 116608, 116294, + 115980, 115668, 115356, 115045, 114735, 114426, 114118, 113810, 113504, 113198, 112893, + 112589, 112285, 111983, 111681, 111380, 111080, 110780, 110482, 110184, 109887, 109591, + 109296, 109001, 108708, 108415, 108122, 107831, 107541, 107251, 106962, 106674, 106386, + 106099, 105813, 105528, 105244, 104960, 104678, 104395, 104114, 103834, 103554, 103275, + 102996, 102719, 102442, 102166, 101891, 101616, 101342, 101069, 100797, 100525, 100254, + 99984, 99715, 99446, 99178, 98911, 98644, 98378, 98113, 97849, 97585, 97322, + 97060, 96799, 96538, 96278, 96018, 95759, 95501, 95244, 94987, 94731, 94476, + 94222, 93968, 93714, 93462, 93210, 92959, 92708, 92459, 92209, 91961, 91713, + 91466, 91219, 90974, 90729, 90484, 90240, 89997, 89754, 89513, 89271, 89031, + 88791, 88552, 88313, 88075, 87838, 87601, 87365, 87130, 86895, 86661, 86427, + 86194, 85962, 85730, 85499, 85269, 85039, 84810, 84581, 84353, 84126, 83899, + 83673, 83448, 83223, 82999, 82775, 82552, 82330, 82108, 81886, 81666, 81446, + 81226, 81007, 80789, 80571, 80354, 80138, 79922, 79706, 79492, 79277, 79064, + 78851, 78638, 78426, 78215, 78004, 77794, 77584, 77375, 77167, 76959, 76752, + 76545, 76338, 76133, 75928, 75723, 75519, 75315, 75112, 74910, 74708, 74507, + 74306, 74106, 73906, 73707, 73508, 73310, 73113, 72916, 72719, 72523, 72328, + 72133, 71939, 71745, 71551, 71359, 71166, 70975, 70783, 70593, 70402, 70213, + 70023, 69835, 69646, 69459, 69272, 69085, 68899, 68713, 68528, 68343, 68159, + 67975, 67792, 67610, 67427, 67246, 67065, 66884, 66704, 66524, 66345, 66166, + 65987, 65810, 65632, 65455, 65279, 65103, 64928, 64753, 64578, 64404, 64231, + 64058, 63885, 63713, 63541, 63370, 63199, 63029, 62859, 62690, 62521, 62352, + 62184, 62017, 61850, 61683, 61517, 61351, 61186, 61021, 60856, 60692, 60529, + 60366, 60203, 60041, 59879, 59718, 59557, 59396, 59236, 59076, 58917, 58758, + 58600, 58442, 58285, 58128, 57971, 57815, 57659, 57504, 57349, 57194, 57040, + 56886, 56733, 56580, 56428, 56276, 56124, 55973, 55822, 55671, 55521, 55372, + 55223, 55074, 54925, 54777, 54630, 54483, 54336, 54189, 54043, 53898, 53752, + 53608, 53463, 53319, 53175, 53032, 52889, 52747, 52605, 52463, 52321, 52180, + 52040, 51900, 51760, 51620, 51481, 51342, 51204, 51066, 50928, 50791, 50654, + 50518, 50382, 50246, 50111, 49976, 49841, 49707, 49573, 49439, 49306, 49173, + 49040, 48908, 48776, 48645, 48514, 48383, 48253, 48123, 47993, 47864, 47735, + 47606, 47478, 47350, 47222, 47095, 46968, 46842, 46715, 46590, 46464, 46339, + 46214, 46089, 45965, 45841, 45718, 45595, 45472, 45349, 45227, 45105, 44984, + 44862, 44741, 44621, 44501, 44381, 44261, 44142, 44023, 43904, 43786, 43668, + 43550, 43433, 43316, 43199, 43083, 42967, 42851, 42735, 42620, 42505, 42391, + 42277, 42163, 42049, 41936, 41823, 41710, 41598, 41486, 41374, 41262, 41151, + 41040, 40930, 40819, 40709, 40600, 40490, 40381, 40272, 40164, 40056, 39948, + 39840, 39733, 39626, 39519, 39412, 39306, 39200, 39094, 38989, 38884, 38779, + 38675, 38571, 38467, 38363, 38260, 38157, 38054, 37951, 37849, 37747, 37645, + 37544, 37443, 37342, 37241, 37141, 37041, 36941, 36841, 36742, 36643, 36544, + 36446, 36347, 36250, 36152, 36054, 35957, 35860, 35764, 35667, 35571, 35475, + 35380, 35284, 35189, 35095, 35000, 34906, 34812, 34718, 34624, 34531, 34438, + 34345, 34253, 34160, 34068, 33976, 33885 +}; + +static const short sindb_coeff[] = { + 2401, 2144, 1994, 1887, 1804, 1737, 1680, 1630, 1587, 1548, 1512, 1480, 1450, + 1423, 1397, 1373, 1351, 1330, 1310, 1291, 1273, 1255, 1239, 1223, 1208, 1194, + 1180, 1166, 1153, 1141, 1128, 1117, 1105, 1094, 1084, 1073, 1063, 1053, 1043, + 1034, 1025, 1016, 1007, 999, 990, 982, 974, 967, 959, 952, 944, 937, + 930, 923, 916, 910, 903, 897, 890, 884, 878, 872, 866, 860, 855, + 849, 843, 838, 832, 827, 822, 817, 812, 807, 802, 797, 792, 787, + 783, 778, 773, 769, 764, 760, 756, 751, 747, 743, 739, 734, 730, + 726, 722, 718, 715, 711, 707, 703, 699, 696, 692, 688, 685, 681, + 678, 674, 671, 667, 664, 661, 657, 654, 651, 648, 644, 641, 638, + 635, 632, 629, 626, 623, 620, 617, 614, 611, 608, 605, 602, 599, + 597, 594, 591, 588, 586, 583, 580, 578, 575, 572, 570, 567, 565, + 562, 560, 557, 555, 552, 550, 547, 545, 542, 540, 538, 535, 533, + 531, 528, 526, 524, 522, 519, 517, 515, 513, 510, 508, 506, 504, + 502, 500, 498, 495, 493, 491, 489, 487, 485, 483, 481, 479, 477, + 475, 473, 471, 469, 467, 465, 464, 462, 460, 458, 456, 454, 452, + 450, 449, 447, 445, 443, 441, 440, 438, 436, 434, 433, 431, 429, + 427, 426, 424, 422, 421, 419, 417, 416, 414, 412, 411, 409, 408, + 406, 404, 403, 401, 400, 398, 396, 395, 393, 392, 390, 389, 387, + 386, 384, 383, 381, 380, 378, 377, 375, 374, 372, 371, 370, 368, + 367, 365, 364, 362, 361, 360, 358, 357, 355, 354, 353, 351, 350, + 349, 347, 346, 345, 343, 342, 341, 339, 338, 337, 336, 334, 333, + 332, 330, 329, 328, 327, 325, 324, 323, 322, 320, 319, 318, 317, + 316, 314, 313, 312, 311, 310, 308, 307, 306, 305, 304, 303, 301, + 300, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287, + 286, 285, 284, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, + 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, + 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, + 246, 245, 244, 243, 242, 241, 240, 240, 239, 238, 237, 236, 235, + 234, 233, 232, 231, 230, 230, 229, 228, 227, 226, 225, 224, 223, + 222, 222, 221, 220, 219, 218, 217, 216, 216, 215, 214, 213, 212, + 211, 211, 210, 209, 208, 207, 206, 206, 205, 204, 203, 202, 202, + 201, 200, 199, 198, 198, 197, 196, 195, 195, 194, 193, 192, 191, + 191, 190, 189, 188, 188, 187, 186, 185, 185, 184, 183, 182, 182, + 181, 180, 180, 179, 178, 177, 177, 176, 175, 174, 174, 173, 172, + 172, 171, 170, 170, 169, 168, 167, 167, 166, 165, 165, 164, 163, + 163, 162, 161, 161, 160, 159, 159, 158, 157, 157, 156, 155, 155, + 154, 153, 153, 152, 151, 151, 150, 150, 149, 148, 148, 147, 146, + 146, 145, 145, 144, 143, 143, 142, 141, 141, 140, 140, 139, 138, + 138, 137, 137, 136, 135, 135, 134, 134, 133, 133, 132, 131, 131, + 130, 130, 129, 129, 128, 127, 127, 126, 126, 125, 125, 124, 123, + 123, 122, 122, 121, 121, 120, 120, 119, 119, 118, 117, 117, 116, + 116, 115, 115, 114, 114, 113, 113, 112, 112, 111, 111, 110, 110, + 109, 109, 108, 108, 107, 107, 106, 106, 105, 105, 104, 104, 103, + 103, 102, 102, 101, 101, 100, 100, 99, 99, 98, 98, 97, 97, + 96, 96, 95, 95, 94, 94, 94, 93, 93, 92, 92, 91, 91, + 90, 90, 89, 89, 89, 88, 88, 87, 87, 86, 86, 85, 85, + 85, 84, 84, 83, 83, 82, 82, 82, 81, 81, 80, 80, 79, + 79, 79, 78, 78, 77, 77, 77, 76, 76, 75, 75, 75, 74, + 74, 73, 73, 73, 72, 72, 71, 71, 71, 70, 70, 69, 69, + 69, 68, 68, 68, 67, 67, 66, 66, 66, 65, 65, 65, 64, + 64, 63, 63, 63, 62, 62, 62, 61, 61, 61, 60, 60, 59, + 59, 59, 58, 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, + 55, 54, 54, 54, 53, 53, 53, 52, 52, 52, 51, 51, 51, + 50, 50, 50, 49, 49, 49, 49, 48, 48, 48, 47, 47, 47, + 46, 46, 46, 45, 45, 45, 45, 44, 44, 44, 43, 43, 43, + 43, 42, 42, 42, 41, 41, 41, 40, 40, 40, 40, 39, 39, + 39, 39, 38, 38, 38, 37, 37, 37, 37, 36, 36, 36, 36, + 35, 35, 35, 35, 34, 34, 34, 34, 33, 33, 33, 32, 32, + 32, 32, 31, 31, 31, 31, 31, 30, 30, 30, 30, 29, 29, + 29, 29, 28, 28, 28, 28, 27, 27, 27, 27, 27, 26, 26, + 26, 26, 25, 25, 25, 25, 25, 24, 24, 24, 24, 23, 23, + 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21, 21, 21, + 20, 20, 20, 20, 20, 19, 19, 19, 19, 19, 19, 18, 18, + 18, 18, 18, 17, 17, 17, 17, 17, 17, 16, 16, 16, 16, + 16, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, + 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, + 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, + 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + + +static const short lfo_freq_coeff[] = { + 0, 3, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37, + 40, 43, 46, 50, 53, 56, 59, 62, 65, 68, 71, 74, 78, + 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 115, 118, + 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, + 160, 163, 166, 169, 172, 175, 178, 180, 183, 186, 189, 192, 195, + 198, 201, 204, 207, 209, 212, 215, 218, 221, 224, 226, 229, 232, + 235, 238, 240, 243, 246, 249, 251, 254, 257, 260, 262, 265, 268, + 270, 273, 276, 278, 281, 283, 286, 289, 291, 294, 296, 299, 301, + 304, 306, 309, 311, 314, 316, 319, 321, 324, 326, 328, 331, 333, + 336, 338, 340, 343, 345, 347, 350, 352, 354, 356, 359, 361, 363, + 365, 367, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 391, + 393, 395, 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, 415, + 417, 419, 421, 423, 424, 426, 428, 430, 431, 433, 435, 436, 438, + 439, 441, 443, 444, 446, 447, 449, 450, 452, 453, 455, 456, 457, + 459, 460, 461, 463, 464, 465, 467, 468, 469, 470, 472, 473, 474, + 475, 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 488, 489, 490, 491, 492, 493, 494, 494, 495, 496, 497, 497, 498, + 499, 499, 500, 501, 501, 502, 502, 503, 504, 504, 504, 505, 505, + 506, 506, 507, 507, 507, 508, 508, 508, 509, 509, 509, 509, 510, + 510, 510, 510, 510, 510, 510, 510, 510, 510, 511, 510, 510, 510, + 510, 510, 510, 510, 510, 510, 510, 509, 509, 509, 509, 508, 508, + 508, 507, 507, 507, 506, 506, 505, 505, 504, 504, 504, 503, 502, + 502, 501, 501, 500, 499, 499, 498, 497, 497, 496, 495, 494, 494, + 493, 492, 491, 490, 489, 488, 488, 487, 486, 485, 484, 483, 482, + 481, 480, 478, 477, 476, 475, 474, 473, 472, 470, 469, 468, 467, + 465, 464, 463, 461, 460, 459, 457, 456, 455, 453, 452, 450, 449, + 447, 446, 444, 443, 441, 439, 438, 436, 435, 433, 431, 430, 428, + 426, 424, 423, 421, 419, 417, 415, 414, 412, 410, 408, 406, 404, + 402, 400, 398, 396, 395, 393, 391, 388, 386, 384, 382, 380, 378, + 376, 374, 372, 370, 367, 365, 363, 361, 359, 356, 354, 352, 350, + 347, 345, 343, 340, 338, 336, 333, 331, 328, 326, 324, 321, 319, + 316, 314, 311, 309, 306, 304, 301, 299, 296, 294, 291, 289, 286, + 283, 281, 278, 276, 273, 270, 268, 265, 262, 260, 257, 254, 251, + 249, 246, 243, 240, 238, 235, 232, 229, 226, 224, 221, 218, 215, + 212, 209, 207, 204, 201, 198, 195, 192, 189, 186, 183, 180, 178, + 175, 172, 169, 166, 163, 160, 157, 154, 151, 148, 145, 142, 139, + 136, 133, 130, 127, 124, 121, 118, 115, 111, 108, 105, 102, 99, + 96, 93, 90, 87, 84, 81, 78, 74, 71, 68, 65, 62, 59, + 56, 53, 50, 46, 43, 40, 37, 34, 31, 28, 25, 21, 18, + 15, 12, 9, 6, 3, 0, -3, -6, -9, -12, -15, -18, -21, + -25, -28, -31, -34, -37, -40, -43, -46, -50, -53, -56, -59, -62, + -65, -68, -71, -74, -78, -81, -84, -87, -90, -93, -96, -99, -102, + -105, -108, -111, -115, -118, -121, -124, -127, -130, -133, -136, -139, -142, + -145, -148, -151, -154, -157, -160, -163, -166, -169, -172, -175, -178, -180, + -183, -186, -189, -192, -195, -198, -201, -204, -207, -209, -212, -215, -218, + -221, -224, -226, -229, -232, -235, -238, -240, -243, -246, -249, -251, -254, + -257, -260, -262, -265, -268, -270, -273, -276, -278, -281, -283, -286, -289, + -291, -294, -296, -299, -301, -304, -306, -309, -311, -314, -316, -319, -321, + -324, -326, -328, -331, -333, -336, -338, -340, -343, -345, -347, -350, -352, + -354, -356, -359, -361, -363, -365, -367, -370, -372, -374, -376, -378, -380, + -382, -384, -386, -388, -391, -393, -395, -396, -398, -400, -402, -404, -406, + -408, -410, -412, -414, -415, -417, -419, -421, -423, -424, -426, -428, -430, + -431, -433, -435, -436, -438, -439, -441, -443, -444, -446, -447, -449, -450, + -452, -453, -455, -456, -457, -459, -460, -461, -463, -464, -465, -467, -468, + -469, -470, -472, -473, -474, -475, -476, -477, -478, -480, -481, -482, -483, + -484, -485, -486, -487, -488, -488, -489, -490, -491, -492, -493, -494, -494, + -495, -496, -497, -497, -498, -499, -499, -500, -501, -501, -502, -502, -503, + -504, -504, -504, -505, -505, -506, -506, -507, -507, -507, -508, -508, -508, + -509, -509, -509, -509, -510, -510, -510, -510, -510, -510, -510, -510, -510, + -510, -511, -510, -510, -510, -510, -510, -510, -510, -510, -510, -510, -509, + -509, -509, -509, -508, -508, -508, -507, -507, -507, -506, -506, -505, -505, + -504, -504, -504, -503, -502, -502, -501, -501, -500, -499, -499, -498, -497, + -497, -496, -495, -494, -494, -493, -492, -491, -490, -489, -488, -488, -487, + -486, -485, -484, -483, -482, -481, -480, -478, -477, -476, -475, -474, -473, + -472, -470, -469, -468, -467, -465, -464, -463, -461, -460, -459, -457, -456, + -455, -453, -452, -450, -449, -447, -446, -444, -443, -441, -439, -438, -436, + -435, -433, -431, -430, -428, -426, -424, -423, -421, -419, -417, -415, -414, + -412, -410, -408, -406, -404, -402, -400, -398, -396, -395, -393, -391, -388, + -386, -384, -382, -380, -378, -376, -374, -372, -370, -367, -365, -363, -361, + -359, -356, -354, -352, -350, -347, -345, -343, -340, -338, -336, -333, -331, + -328, -326, -324, -321, -319, -316, -314, -311, -309, -306, -304, -301, -299, + -296, -294, -291, -289, -286, -283, -281, -278, -276, -273, -270, -268, -265, + -262, -260, -257, -254, -251, -249, -246, -243, -240, -238, -235, -232, -229, + -226, -224, -221, -218, -215, -212, -209, -207, -204, -201, -198, -195, -192, + -189, -186, -183, -180, -178, -175, -172, -169, -166, -163, -160, -157, -154, + -151, -148, -145, -142, -139, -136, -133, -130, -127, -124, -121, -118, -115, + -111, -108, -105, -102, -99, -96, -93, -90, -87, -84, -81, -78, -74, + -71, -68, -65, -62, -59, -56, -53, -50, -46, -43, -40, -37, -34, + -31, -28, -25, -21, -18, -15, -12, -9, -6, -3 +}; + +static const short lfo_env_coeff[] = { + 251, 253, 254, 256, 257, 259, 260, 262, 264, 265, 267, 268, 270, + 271, 273, 274, 276, 277, 279, 281, 282, 284, 285, 287, 288, 290, + 291, 293, 294, 296, 297, 299, 300, 302, 303, 305, 306, 308, 309, + 311, 312, 314, 315, 317, 318, 320, 321, 323, 324, 326, 327, 329, + 330, 332, 333, 335, 336, 337, 339, 340, 342, 343, 345, 346, 348, + 349, 350, 352, 353, 355, 356, 357, 359, 360, 362, 363, 364, 366, + 367, 369, 370, 371, 373, 374, 375, 377, 378, 379, 381, 382, 383, + 385, 386, 387, 389, 390, 391, 392, 394, 395, 396, 397, 399, 400, + 401, 402, 404, 405, 406, 407, 409, 410, 411, 412, 413, 414, 416, + 417, 418, 419, 420, 421, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 453, 454, 455, 456, + 457, 458, 459, 460, 461, 461, 462, 463, 464, 465, 466, 466, 467, + 468, 469, 469, 470, 471, 472, 473, 473, 474, 475, 475, 476, 477, + 477, 478, 479, 479, 480, 481, 481, 482, 483, 483, 484, 484, 485, + 486, 486, 487, 487, 488, 488, 489, 489, 490, 490, 491, 491, 492, + 492, 493, 493, 493, 494, 494, 495, 495, 495, 496, 496, 497, 497, + 497, 498, 498, 498, 498, 499, 499, 499, 500, 500, 500, 500, 500, + 501, 501, 501, 501, 501, 502, 502, 502, 502, 502, 502, 502, 502, + 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 503, 503, 503, 502, 502, 502, 502, 502, 502, 502, + 502, 501, 501, 501, 501, 501, 500, 500, 500, 500, 500, 499, 499, + 499, 498, 498, 498, 498, 497, 497, 497, 496, 496, 495, 495, 495, + 494, 494, 493, 493, 493, 492, 492, 491, 491, 490, 490, 489, 489, + 488, 488, 487, 487, 486, 486, 485, 484, 484, 483, 483, 482, 481, + 481, 480, 479, 479, 478, 477, 477, 476, 475, 475, 474, 473, 473, + 472, 471, 470, 469, 469, 468, 467, 466, 466, 465, 464, 463, 462, + 461, 461, 460, 459, 458, 457, 456, 455, 454, 453, 453, 452, 451, + 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, + 437, 436, 435, 434, 432, 431, 430, 429, 428, 427, 426, 425, 424, + 423, 421, 420, 419, 418, 417, 416, 414, 413, 412, 411, 410, 409, + 407, 406, 405, 404, 402, 401, 400, 399, 397, 396, 395, 394, 392, + 391, 390, 389, 387, 386, 385, 383, 382, 381, 379, 378, 377, 375, + 374, 373, 371, 370, 369, 367, 366, 364, 363, 362, 360, 359, 357, + 356, 355, 353, 352, 350, 349, 348, 346, 345, 343, 342, 340, 339, + 337, 336, 335, 333, 332, 330, 329, 327, 326, 324, 323, 321, 320, + 318, 317, 315, 314, 312, 311, 309, 308, 306, 305, 303, 302, 300, + 299, 297, 296, 294, 293, 291, 290, 288, 287, 285, 284, 282, 281, + 279, 277, 276, 274, 273, 271, 270, 268, 267, 265, 264, 262, 260, + 259, 257, 256, 254, 253, 251, 250, 248, 247, 245, 244, 242, 240, + 239, 237, 236, 234, 233, 231, 230, 228, 227, 225, 223, 222, 220, + 219, 217, 216, 214, 213, 211, 210, 208, 207, 205, 204, 202, 201, + 199, 198, 196, 195, 193, 192, 190, 189, 187, 186, 184, 183, 181, + 180, 178, 177, 175, 174, 172, 171, 169, 168, 166, 165, 164, 162, + 161, 159, 158, 156, 155, 153, 152, 151, 149, 148, 146, 145, 144, + 142, 141, 139, 138, 137, 135, 134, 133, 131, 130, 129, 127, 126, + 124, 123, 122, 120, 119, 118, 117, 115, 114, 113, 111, 110, 109, + 108, 106, 105, 104, 103, 101, 100, 99, 98, 96, 95, 94, 93, + 92, 90, 89, 88, 87, 86, 84, 83, 82, 81, 80, 79, 78, + 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, + 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, + 50, 49, 48, 47, 46, 45, 45, 44, 43, 42, 41, 40, 39, + 39, 38, 37, 36, 35, 35, 34, 33, 32, 31, 31, 30, 29, + 29, 28, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 20, + 20, 19, 19, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, + 13, 12, 12, 11, 11, 10, 10, 9, 9, 9, 8, 8, 7, + 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, + 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, + 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, + 19, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26, + 27, 28, 29, 29, 30, 31, 31, 32, 33, 34, 35, 35, 36, + 37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, + 89, 90, 92, 93, 94, 95, 96, 98, 99, 100, 101, 103, 104, + 105, 106, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 120, + 122, 123, 124, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, + 139, 141, 142, 144, 145, 146, 148, 149, 151, 152, 153, 155, 156, + 158, 159, 161, 162, 164, 165, 166, 168, 169, 171, 172, 174, 175, + 177, 178, 180, 181, 183, 184, 186, 187, 189, 190, 192, 193, 195, + 196, 198, 199, 201, 202, 204, 205, 207, 208, 210, 211, 213, 214, + 216, 217, 219, 220, 222, 223, 225, 227, 228, 230, 231, 233, 234, + 236, 237, 239, 240, 242, 244, 245, 247, 248, 250 +}; + +#endif diff --git a/apps/codecs/libgme/z80_cpu.h b/apps/codecs/libgme/z80_cpu.h index 15115b7..341119b 100644 --- a/apps/codecs/libgme/z80_cpu.h +++ b/apps/codecs/libgme/z80_cpu.h @@ -1,116 +1,116 @@ -// Z80 CPU emulator
-
-// Game_Music_Emu 0.6-pre
-#ifndef Z80_CPU_H
-#define Z80_CPU_H
-
-#include "blargg_source.h"
-#include "blargg_endian.h"
-
-typedef int cpu_time_t;
-typedef int addr_t;
-
-enum { page_bits = 10 };
-enum { page_size = 1 << page_bits };
-enum { page_count = 0x10000 / page_size };
-
-// Can read this far past end of memory
-enum { cpu_padding = 0x100 };
-
-// Can read this many bytes past end of a page
-enum { page_padding = 4 };
-
-#ifdef BLARGG_BIG_ENDIAN
- struct regs_t { byte b,c, d,e, h,l, flags,a; };
-#else
- struct regs_t { byte c,b, e,d, l,h, a,flags; };
-#endif
-// BOOST_STATIC_ASSERT( sizeof (regs_t) == 8 );
-
-struct pairs_t { uint16_t bc, de, hl, fa; };
-
-// Registers are not updated until run() returns
-struct registers_t {
- uint16_t pc;
- uint16_t sp;
- uint16_t ix;
- uint16_t iy;
- union {
- struct regs_t b; // b.b, b.c, b.d, b.e, b.h, b.l, b.flags, b.a
- struct pairs_t w; // w.bc, w.de, w.hl. w.fa
- };
- union {
- struct regs_t b;
- struct pairs_t w;
- } alt;
- byte iff1;
- byte iff2;
- byte r;
- byte i;
- byte im;
-};
-
-struct cpu_state_t {
- byte const* read [page_count + 1];
- byte * write [page_count + 1];
- cpu_time_t base;
- cpu_time_t time;
-};
-
-struct Z80_Cpu {
- byte szpc [0x200];
- cpu_time_t end_time_;
-
- struct cpu_state_t* cpu_state; // points to cpu_state_ or a local copy within run()
- struct cpu_state_t cpu_state_;
-
- struct registers_t r;
-};
-
-void Z80_init( struct Z80_Cpu* this );
-
-// Clears registers and maps all pages to unmapped
-void Z80_reset( struct Z80_Cpu* this, void* unmapped_write, void const* unmapped_read );
-
-// TODO: split mapping out of CPU
-
-// Maps memory. Start and size must be multiple of page_size.
-void Z80_map_mem( struct Z80_Cpu* this, addr_t addr, int size, void* write, void const* read );
-
-// Time of beginning of next instruction
-static inline cpu_time_t Z80_time( struct Z80_Cpu* this ) { return this->cpu_state->time + this->cpu_state->base; }
-
-// Alter current time
-static inline void Z80_set_time( struct Z80_Cpu* this, cpu_time_t t ) { this->cpu_state->time = t - this->cpu_state->base; }
-static inline void Z80_adjust_time( struct Z80_Cpu* this, int delta ) { this->cpu_state->time += delta; }
-
-#ifdef BLARGG_NONPORTABLE
- #define Z80_CPU_OFFSET( addr ) (addr)
-#else
- #define Z80_CPU_OFFSET( addr ) ((addr) & (page_size - 1))
-#endif
-
-// Maps address to pointer to that byte
-static inline byte* Z80_write( struct Z80_Cpu* this, addr_t addr )
-{
- return this->cpu_state->write [(unsigned) addr >> page_bits] + Z80_CPU_OFFSET( addr );
-}
-
-static inline byte const* Z80_read( struct Z80_Cpu* this, addr_t addr )
-{
- return this->cpu_state->read [(unsigned) addr >> page_bits] + Z80_CPU_OFFSET( addr );
-}
-
-static inline void Z80_map_mem_rw( struct Z80_Cpu* this, addr_t addr, int size, void* p )
-{
- Z80_map_mem( this, addr, size, p, p );
-}
-
-static inline void Z80_set_end_time( struct Z80_Cpu* this, cpu_time_t t )
-{
- cpu_time_t delta = this->cpu_state->base - t;
- this->cpu_state->base = t;
- this->cpu_state->time += delta;
-}
-
-#endif
+// Z80 CPU emulator + +// Game_Music_Emu 0.6-pre +#ifndef Z80_CPU_H +#define Z80_CPU_H + +#include "blargg_source.h" +#include "blargg_endian.h" + +typedef int cpu_time_t; +typedef int addr_t; + +enum { page_bits = 10 }; +enum { page_size = 1 << page_bits }; +enum { page_count = 0x10000 / page_size }; + +// Can read this far past end of memory +enum { cpu_padding = 0x100 }; + +// Can read this many bytes past end of a page +enum { page_padding = 4 }; + +#ifdef BLARGG_BIG_ENDIAN + struct regs_t { byte b,c, d,e, h,l, flags,a; }; +#else + struct regs_t { byte c,b, e,d, l,h, a,flags; }; +#endif +// BOOST_STATIC_ASSERT( sizeof (regs_t) == 8 ); + +struct pairs_t { uint16_t bc, de, hl, fa; }; + +// Registers are not updated until run() returns +struct registers_t { + uint16_t pc; + uint16_t sp; + uint16_t ix; + uint16_t iy; + union { + struct regs_t b; // b.b, b.c, b.d, b.e, b.h, b.l, b.flags, b.a + struct pairs_t w; // w.bc, w.de, w.hl. w.fa + }; + union { + struct regs_t b; + struct pairs_t w; + } alt; + byte iff1; + byte iff2; + byte r; + byte i; + byte im; +}; + +struct cpu_state_t { + byte const* read [page_count + 1]; + byte * write [page_count + 1]; + cpu_time_t base; + cpu_time_t time; +}; + +struct Z80_Cpu { + byte szpc [0x200]; + cpu_time_t end_time_; + + struct cpu_state_t* cpu_state; // points to cpu_state_ or a local copy within run() + struct cpu_state_t cpu_state_; + + struct registers_t r; +}; + +void Z80_init( struct Z80_Cpu* this ); + +// Clears registers and maps all pages to unmapped +void Z80_reset( struct Z80_Cpu* this, void* unmapped_write, void const* unmapped_read ); + +// TODO: split mapping out of CPU + +// Maps memory. Start and size must be multiple of page_size. +void Z80_map_mem( struct Z80_Cpu* this, addr_t addr, int size, void* write, void const* read ); + +// Time of beginning of next instruction +static inline cpu_time_t Z80_time( struct Z80_Cpu* this ) { return this->cpu_state->time + this->cpu_state->base; } + +// Alter current time +static inline void Z80_set_time( struct Z80_Cpu* this, cpu_time_t t ) { this->cpu_state->time = t - this->cpu_state->base; } +static inline void Z80_adjust_time( struct Z80_Cpu* this, int delta ) { this->cpu_state->time += delta; } + +#ifdef BLARGG_NONPORTABLE + #define Z80_CPU_OFFSET( addr ) (addr) +#else + #define Z80_CPU_OFFSET( addr ) ((addr) & (page_size - 1)) +#endif + +// Maps address to pointer to that byte +static inline byte* Z80_write( struct Z80_Cpu* this, addr_t addr ) +{ + return this->cpu_state->write [(unsigned) addr >> page_bits] + Z80_CPU_OFFSET( addr ); +} + +static inline byte const* Z80_read( struct Z80_Cpu* this, addr_t addr ) +{ + return this->cpu_state->read [(unsigned) addr >> page_bits] + Z80_CPU_OFFSET( addr ); +} + +static inline void Z80_map_mem_rw( struct Z80_Cpu* this, addr_t addr, int size, void* p ) +{ + Z80_map_mem( this, addr, size, p, p ); +} + +static inline void Z80_set_end_time( struct Z80_Cpu* this, cpu_time_t t ) +{ + cpu_time_t delta = this->cpu_state->base - t; + this->cpu_state->base = t; + this->cpu_state->time += delta; +} + +#endif diff --git a/apps/codecs/libgme/z80_cpu_run.h b/apps/codecs/libgme/z80_cpu_run.h index 18195ac..a453487 100644 --- a/apps/codecs/libgme/z80_cpu_run.h +++ b/apps/codecs/libgme/z80_cpu_run.h @@ -1,1696 +1,1696 @@ -// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
-
-// Last validated with zexall 2009.12.05.
-// Doesn't implement the R register or immediate interrupt after EI.
-// Address wrap-around isn't completely correct, but is prevented from crashing emulator.
-// 16-bit memory accesses are made directly to mapped memory, instead of using macro.
-
-#if 0
-/* Define these macros in the source file before #including this file.
-- Parameters might be expressions, so they are best evaluated only once,
-though they NEVER have side-effects, so multiple evaluation is OK.
-- Output parameters might be a multiple-assignment expression like "a=x",
-so they must NOT be parenthesized.
-- Except where noted, time() and related functions will NOT work
-correctly inside a macro. TIME() is always correct, and between FLUSH_TIME() and
-CACHE_TIME() the normal time changing functions can be used.
-- Macros "returning" void may use a {} statement block. */
-
- // 0 <= addr <= 0xFFFF + 0x100
- // Optional; default uses whatever was set with map_mem()
- int READ_MEM( addr_t );
- void WRITE_MEM( addr_t, int data );
-
- // 0 <= port <= 0xFFFF (apparently upper 8 bits are output by hardware)
- void OUT_PORT( int port, int data );
- int IN_PORT int port );
-
- // Reference to Z80_Cpu object used for emulation
- #define CPU cpu
-
-// The following can be used within macros:
-
- // Current time
- time_t TIME();
-
- // Allows use of time functions
- void FLUSH_TIME();
-
- // Must be used before end of macro if FLUSH_TIME() was used earlier
- void CACHE_TIME();
-
-// Configuration (optional; commented behavior if defined)
-
- // Optimizes as if map_mem( 0, 0x10000, FLAT_MEM, FLAT_MEM ) is always in effect
- #define FLAT_MEM my_mem_array
-
- // If RST 7 ($FF) is encountered and PC = IDLE_ADDR, stops execution
- #define IDLE_ADDR 0x1234
-
- // Expanded just before beginning of code, to help debugger
- #define CPU_BEGIN void my_run_cpu() {
-
-#endif
-
-/* Copyright (C) 2006-2008 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
-version 2.1 of the License, or (at your option) any later version. This
-module is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details. You should have received a copy of the GNU Lesser General Public
-License along with this module; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#ifdef CPU_BEGIN
- CPU_BEGIN
-#endif
-
-#define R cpu->r
-
-// flags, named with hex value for clarity
-int const S80 = 0x80;
-int const Z40 = 0x40;
-int const F20 = 0x20;
-int const H10 = 0x10;
-int const F08 = 0x08;
-int const V04 = 0x04;
-int const P04 = 0x04;
-int const N02 = 0x02;
-int const C01 = 0x01;
-
-#define SZ28P( n ) cpu->szpc [n]
-#define SZ28PC( n ) cpu->szpc [n]
-#define SZ28C( n ) (cpu->szpc [n] & ~P04)
-#define SZ28( n ) SZ28C( n )
-
-#define SET_R( n ) (void) (R.r = n)
-#define GET_R() (R.r)
-
-// Time
-#define TIME() (s_time + s.base)
-#define FLUSH_TIME() {s.time = s_time;}
-#define CACHE_TIME() {s_time = s.time;}
-
-// Memory
-#define RW_MEM( addr, rw ) RW_PAGE( addr, rw ) [RW_OFFSET( addr )]
-#define READ_CODE( addr ) RW_MEM( addr, read )
-
-#ifdef FLAT_MEM
- #define RW_PAGE( addr, rw ) FLAT_MEM
- #define RW_OFFSET( addr ) (addr)
- #define INSTR( off, addr ) READ_CODE( addr )
-#else
- #define RW_PAGE( addr, rw ) s.rw [(unsigned) (addr) >> page_bits]
- #define RW_OFFSET( addr ) Z80_CPU_OFFSET( addr )
- #define INSTR( off, addr ) instr [off]
-#endif
-
-#ifndef READ_MEM
- #define READ_MEM( addr ) RW_MEM( addr, read )
-#endif
-
-#ifndef WRITE_MEM
- #define WRITE_MEM( addr, data ) (RW_MEM( addr, write ) = data)
-#endif
-
-#define READ_WORD( addr ) GET_LE16( &RW_MEM( addr, read ) )
-#define WRITE_WORD( addr, data ) SET_LE16( &RW_MEM( addr, write ), data )
-
-// Truncation
-#define BYTE( n ) ((uint8_t ) (n)) /* (unsigned) n & 0xFF */
-#define SBYTE( n ) ((int8_t ) (n)) /* (BYTE( n ) ^ 0x80) - 0x80 */
-#define WORD( n ) ((uint16_t) (n)) /* (unsigned) n & 0xFFFF */
-
-// Misc
-#define CASE5( a, b, c, d, e ) case 0x##a:case 0x##b:case 0x##c:case 0x##d:case 0x##e
-#define CASE6( a, b, c, d, e, f ) CASE5( a, b, c, d, e ): case 0x##f
-#define CASE7( a, b, c, d, e, f, g ) CASE6( a, b, c, d, e, f ): case 0x##g
-#define CASE8( a, b, c, d, e, f, g, h ) CASE7( a, b, c, d, e, f, g ): case 0x##h
-
-#ifdef BLARGG_BIG_ENDIAN
- #define R8( n, offset ) ((r.r8_ - offset) [n])
-#elif BLARGG_LITTLE_ENDIAN
- #define R8( n, offset ) ((r.r8_ - offset) [(n) ^ 1])
-#else
- #error "Byte order of CPU must be known"
-#endif
-
-#define R16( n, shift, offset ) (r.r16_ [((unsigned) (n) >> shift) - (offset >> shift)])
-
-#define EX( x, y ) \
- {\
- int temp = x;\
- x = y;\
- y = temp;\
- }
-
-#define EXX( name ) \
- EX( R.alt.name, r.name )
-
-bool warning = false;
-{
- struct cpu_state_t s;
- #ifdef FLAT_MEM
- s.base = cpu->cpu_state_.base;
- #else
- s = cpu->cpu_state_;
- #endif
- cpu->cpu_state = &s;
-
-
- union r_t {
- struct regs_t b;
- struct pairs_t w;
- byte r8_ [8]; // indexed
- uint16_t r16_ [4];
- } r;
- r.b = R.b;
-
- cpu_time_t s_time = cpu->cpu_state_.time;
- int pc = R.pc;
- int sp = R.sp;
- int ix = R.ix; // TODO: keep in memory for direct access?
- int iy = R.iy;
- int flags = R.b.flags;
-
- //goto loop; // confuses optimizer
- s_time += 7;
- pc -= 2;
-
-call_not_taken:
- s_time -= 7;
-jp_not_taken:
- pc += 2;
-loop:
-
- check( (unsigned) pc < 0x10000 + 1 ); // +1 so emulator can catch wrap-around
- check( (unsigned) sp < 0x10000 );
- check( (unsigned) flags < 0x100 );
- check( (unsigned) ix < 0x10000 );
- check( (unsigned) iy < 0x10000 );
-
- byte const* instr = RW_PAGE( pc, read );
-
- int opcode;
-
- if ( RW_OFFSET( ~0 ) == ~0 )
- {
- opcode = instr [RW_OFFSET( pc )];
- pc++;
- instr += RW_OFFSET( pc );
- }
- else
- {
- instr += RW_OFFSET( pc );
- opcode = *instr++;
- pc++;
- }
-
- static byte const clock_table [256 * 2] = {
- // 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 4,10, 7, 6, 4, 4, 7, 4, 4,11, 7, 6, 4, 4, 7, 4, // 0
- 8,10, 7, 6, 4, 4, 7, 4,12,11, 7, 6, 4, 4, 7, 4, // 1
- 7,10,16, 6, 4, 4, 7, 4, 7,11,16, 6, 4, 4, 7, 4, // 2
- 7,10,13, 6,11,11,10, 4, 7,11,13, 6, 4, 4, 7, 4, // 3
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 4
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 5
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 6
- 7, 7, 7, 7, 7, 7, 4, 7, 4, 4, 4, 4, 4, 4, 7, 4, // 7
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 8
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 9
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // A
- 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // B
- 11,10,10,10,17,11, 7,11,11,10,10, 8,17,17, 7,11, // C
- 11,10,10,11,17,11, 7,11,11, 4,10,11,17, 8, 7,11, // D
- 11,10,10,19,17,11, 7,11,11, 4,10, 4,17, 8, 7,11, // E
- 11,10,10, 4,17,11, 7,11,11, 6,10, 4,17, 8, 7,11, // F
-
- // high four bits are $ED time - 8, low four bits are $DD/$FD time - 8
- //0 1 2 3 4 5 6 7 8 9 A B C D E F
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x06,0x0C,0x02,0x00,0x00,0x03,0x00,0x00,0x07,0x0C,0x02,0x00,0x00,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x0F,0x0F,0x0B,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10,
- 0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10,
- 0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0xA0,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0xA0,
- 0x4B,0x4B,0x7B,0xCB,0x0B,0x6B,0x00,0x0B,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,
- 0x80,0x80,0x80,0x80,0x00,0x00,0x0B,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0B,0x00,
- 0xD0,0xD0,0xD0,0xD0,0x00,0x00,0x0B,0x00,0xD0,0xD0,0xD0,0xD0,0x00,0x00,0x0B,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x06,0x00,0x0F,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
- };
-
- if ( s_time >= 0 )
- goto out_of_time;
- s_time += clock_table [opcode];
-
- #ifdef Z80_CPU_LOG_H
- //log_opcode( opcode, READ_CODE( pc ) );
- z80_cpu_log( "log.txt", pc - 1, opcode, READ_CODE( pc ),
- READ_CODE( pc + 1 ), READ_CODE( pc + 2 ) );
- z80_log_regs( r.b.a, r.w.bc, r.w.de, r.w.hl, sp, ix, iy );
- #endif
-
-#define GET_ADDR() GET_LE16( &INSTR( 0, pc ) )
-
- int data;
- data = INSTR( 0, pc );
-
- switch ( opcode )
- {
-// Common
-
- case 0x00: // NOP
- CASE7( 40, 49, 52, 5B, 64, 6D, 7F ): // LD B,B etc.
- goto loop;
-
- case 0x08:{// EX AF,AF'
- EXX( b.a );
- EX( R.alt.b.flags, flags );
- goto loop;
- }
-
- case 0xD3: // OUT (imm),A
- pc++;
- OUT_PORT( (data + r.b.a * 0x100), r.b.a );
- goto loop;
-
- case 0x2E: // LD L,imm
- pc++;
- r.b.l = data;
- goto loop;
-
- case 0x3E: // LD A,imm
- pc++;
- r.b.a = data;
- goto loop;
-
- case 0x3A:{// LD A,(addr)
- int addr = GET_ADDR();
- pc += 2;
- r.b.a = READ_MEM( addr );
- goto loop;
- }
-
-// Conditional
-
-#define ZERO (flags & Z40)
-#define CARRY (flags & C01)
-#define EVEN (flags & P04)
-#define MINUS (flags & S80)
-
-// JR
-// TODO: more efficient way to handle negative branch that wraps PC around
-#define JR_( cond, clocks ) {\
- pc++;\
- if ( !(cond) )\
- goto loop;\
- int offset = SBYTE( data );\
- pc = WORD( pc + offset );\
- s_time += clocks;\
- goto loop;\
-}
-
-#define JR( cond ) JR_( cond, 5 )
-
- case 0x20: JR( !ZERO ) // JR NZ,disp
- case 0x28: JR( ZERO ) // JR Z,disp
- case 0x30: JR( !CARRY ) // JR NC,disp
- case 0x38: JR( CARRY ) // JR C,disp
- case 0x18: JR_( true,0) // JR disp
-
- case 0x10:{// DJNZ disp
- int temp = r.b.b - 1;
- r.b.b = temp;
- JR( temp )
- }
-
-// JP
-#define JP( cond ) \
- if ( !(cond) )\
- goto jp_not_taken;\
- pc = GET_ADDR();\
- goto loop;
-
- case 0xC2: JP( !ZERO ) // JP NZ,addr
- case 0xCA: JP( ZERO ) // JP Z,addr
- case 0xD2: JP( !CARRY ) // JP NC,addr
- case 0xDA: JP( CARRY ) // JP C,addr
- case 0xE2: JP( !EVEN ) // JP PO,addr
- case 0xEA: JP( EVEN ) // JP PE,addr
- case 0xF2: JP( !MINUS ) // JP P,addr
- case 0xFA: JP( MINUS ) // JP M,addr
-
- case 0xC3: // JP addr
- pc = GET_ADDR();
- goto loop;
-
- case 0xE9: // JP HL
- pc = r.w.hl;
- goto loop;
-
-// RET
-#define RET( cond ) \
- if ( cond )\
- goto ret_taken;\
- s_time -= 6;\
- goto loop;
-
- case 0xC0: RET( !ZERO ) // RET NZ
- case 0xC8: RET( ZERO ) // RET Z
- case 0xD0: RET( !CARRY ) // RET NC
- case 0xD8: RET( CARRY ) // RET C
- case 0xE0: RET( !EVEN ) // RET PO
- case 0xE8: RET( EVEN ) // RET PE
- case 0xF0: RET( !MINUS ) // RET P
- case 0xF8: RET( MINUS ) // RET M
-
- case 0xC9: // RET
- ret_taken:
- pc = READ_WORD( sp );
- sp = WORD( sp + 2 );
- goto loop;
-
-// CALL
-#define CALL( cond ) \
- if ( cond )\
- goto call_taken;\
- goto call_not_taken;
-
- case 0xC4: CALL( !ZERO ) // CALL NZ,addr
- case 0xCC: CALL( ZERO ) // CALL Z,addr
- case 0xD4: CALL( !CARRY ) // CALL NC,addr
- case 0xDC: CALL( CARRY ) // CALL C,addr
- case 0xE4: CALL( !EVEN ) // CALL PO,addr
- case 0xEC: CALL( EVEN ) // CALL PE,addr
- case 0xF4: CALL( !MINUS ) // CALL P,addr
- case 0xFC: CALL( MINUS ) // CALL M,addr
-
- case 0xCD:{// CALL addr
- call_taken: {
- int addr = pc + 2;
- pc = GET_ADDR();
- sp = WORD( sp - 2 );
- WRITE_WORD( sp, addr );
- goto loop;
- }
- }
-
- case 0xFF: // RST
- #ifdef IDLE_ADDR
- if ( pc == IDLE_ADDR + 1 )
- goto hit_idle_addr;
- #else
- if ( pc > 0x10000 )
- {
- pc = WORD( pc - 1 );
- s_time -= 11;
- goto loop;
- }
- #endif
- CASE7( C7, CF, D7, DF, E7, EF, F7 ):
- data = pc;
- pc = opcode & 0x38;
- #ifdef RST_BASE
- pc += RST_BASE;
- #endif
- goto push_data;
-
-// PUSH/POP
- case 0xF5: // PUSH AF
- data = r.b.a * 0x100u + flags;
- goto push_data;
-
- case 0xC5: // PUSH BC
- case 0xD5: // PUSH DE
- case 0xE5: // PUSH HL
- data = R16( opcode, 4, 0xC5 );
- push_data:
- sp = WORD( sp - 2 );
- WRITE_WORD( sp, data );
- goto loop;
-
- case 0xF1: // POP AF
- flags = READ_MEM( sp );
- r.b.a = READ_MEM( (sp + 1) );
- sp = WORD( sp + 2 );
- goto loop;
-
- case 0xC1: // POP BC
- case 0xD1: // POP DE
- case 0xE1: // POP HL
- R16( opcode, 4, 0xC1 ) = READ_WORD( sp );
- sp = WORD( sp + 2 );
- goto loop;
-
-// ADC/ADD/SBC/SUB
- case 0x96: // SUB (HL)
- case 0x86: // ADD (HL)
- flags &= ~C01;
- case 0x9E: // SBC (HL)
- case 0x8E: // ADC (HL)
- data = READ_MEM( r.w.hl );
- goto adc_data;
-
- case 0xD6: // SUB A,imm
- case 0xC6: // ADD imm
- flags &= ~C01;
- case 0xDE: // SBC A,imm
- case 0xCE: // ADC imm
- pc++;
- goto adc_data;
-
- CASE7( 90, 91, 92, 93, 94, 95, 97 ): // SUB r
- CASE7( 80, 81, 82, 83, 84, 85, 87 ): // ADD r
- flags &= ~C01;
- CASE7( 98, 99, 9A, 9B, 9C, 9D, 9F ): // SBC r
- CASE7( 88, 89, 8A, 8B, 8C, 8D, 8F ): // ADC r
- data = R8( opcode & 7, 0 );
- adc_data: {
- int result = data + (flags & C01);
- data ^= r.b.a;
- flags = opcode >> 3 & N02; // bit 4 is set in subtract opcodes
- if ( flags )
- result = -result;
- result += r.b.a;
- data ^= result;
- flags +=(data & H10) +
- ((data + 0x80) >> 6 & V04) +
- SZ28C( result & 0x1FF );
- r.b.a = result;
- goto loop;
- }
-
-// CP
- case 0xBE: // CP (HL)
- data = READ_MEM( r.w.hl );
- goto cp_data;
-
- case 0xFE: // CP imm
- pc++;
- goto cp_data;
-
- CASE7( B8, B9, BA, BB, BC, BD, BF ): // CP r
- data = R8( opcode, 0xB8 );
- cp_data: {
- int result = r.b.a - data;
- flags = N02 + (data & (F20 | F08)) + (result >> 8 & C01);
- data ^= r.b.a;
- flags +=(((result ^ r.b.a) & data) >> 5 & V04) +
- (((data & H10) ^ result) & (S80 | H10));
- if ( BYTE( result ) )
- goto loop;
- flags += Z40;
- goto loop;
- }
-
-// ADD HL,r.w
-
- case 0x39: // ADD HL,SP
- data = sp;
- goto add_hl_data;
-
- case 0x09: // ADD HL,BC
- case 0x19: // ADD HL,DE
- case 0x29: // ADD HL,HL
- data = R16( opcode, 4, 0x09 );
- add_hl_data: {
- int sum = r.w.hl + data;
- data ^= r.w.hl;
- r.w.hl = sum;
- flags = (flags & (S80 | Z40 | V04)) +
- (sum >> 16) +
- (sum >> 8 & (F20 | F08)) +
- ((data ^ sum) >> 8 & H10);
- goto loop;
- }
-
- case 0x27:{// DAA
- int a = r.b.a;
- if ( a > 0x99 )
- flags |= C01;
-
- int adjust = 0x60 * (flags & C01);
-
- if ( flags & H10 || (a & 0x0F) > 9 )
- adjust += 0x06;
-
- if ( flags & N02 )
- adjust = -adjust;
- a += adjust;
-
- flags = (flags & (C01 | N02)) +
- ((r.b.a ^ a) & H10) +
- SZ28P( BYTE( a ) );
- r.b.a = a;
- goto loop;
- }
-
-// INC/DEC
- case 0x34: // INC (HL)
- data = READ_MEM( r.w.hl ) + 1;
- WRITE_MEM( r.w.hl, data );
- goto inc_set_flags;
-
- CASE7( 04, 0C, 14, 1C, 24, 2C, 3C ): // INC r
- data = ++R8( opcode >> 3, 0 );
- inc_set_flags:
- flags = (flags & C01) +
- (((data & 0x0F) - 1) & H10) +
- SZ28( BYTE( data ) );
- if ( data != 0x80 )
- goto loop;
- flags += V04;
- goto loop;
-
- case 0x35: // DEC (HL)
- data = READ_MEM( r.w.hl ) - 1;
- WRITE_MEM( r.w.hl, data );
- goto dec_set_flags;
-
- CASE7( 05, 0D, 15, 1D, 25, 2D, 3D ): // DEC r
- data = --R8( opcode >> 3, 0 );
- dec_set_flags:
- flags = (flags & C01) + N02 +
- (((data & 0x0F) + 1) & H10) +
- SZ28( BYTE( data ) );
- if ( data != 0x7F )
- goto loop;
- flags += V04;
- goto loop;
-
- case 0x03: // INC BC
- case 0x13: // INC DE
- case 0x23: // INC HL
- R16( opcode, 4, 0x03 )++;
- goto loop;
-
- case 0x33: // INC SP
- sp = WORD( sp + 1 );
- goto loop;
-
- case 0x0B: // DEC BC
- case 0x1B: // DEC DE
- case 0x2B: // DEC HL
- R16( opcode, 4, 0x0B )--;
- goto loop;
-
- case 0x3B: // DEC SP
- sp = WORD( sp - 1 );
- goto loop;
-
-// AND
- case 0xA6: // AND (HL)
- data = READ_MEM( r.w.hl );
- goto and_data;
-
- case 0xE6: // AND imm
- pc++;
- goto and_data;
-
- CASE7( A0, A1, A2, A3, A4, A5, A7 ): // AND r
- data = R8( opcode, 0xA0 );
- and_data:
- r.b.a &= data;
- flags = SZ28P( r.b.a ) + H10;
- goto loop;
-
-// OR
- case 0xB6: // OR (HL)
- data = READ_MEM( r.w.hl );
- goto or_data;
-
- case 0xF6: // OR imm
- pc++;
- goto or_data;
-
- CASE7( B0, B1, B2, B3, B4, B5, B7 ): // OR r
- data = R8( opcode, 0xB0 );
- or_data:
- r.b.a |= data;
- flags = SZ28P( r.b.a );
- goto loop;
-
-// XOR
- case 0xAE: // XOR (HL)
- data = READ_MEM( r.w.hl );
- goto xor_data;
-
- case 0xEE: // XOR imm
- pc++;
- goto xor_data;
-
- CASE7( A8, A9, AA, AB, AC, AD, AF ): // XOR r
- data = R8( opcode, 0xA8 );
- xor_data:
- r.b.a ^= data;
- flags = SZ28P( r.b.a );
- goto loop;
-
-// LD
- CASE7( 70, 71, 72, 73, 74, 75, 77 ): // LD (HL),r
- WRITE_MEM( r.w.hl, R8( opcode, 0x70 ) );
- goto loop;
-
- CASE6( 41, 42, 43, 44, 45, 47 ): // LD B,r
- CASE6( 48, 4A, 4B, 4C, 4D, 4F ): // LD C,r
- CASE6( 50, 51, 53, 54, 55, 57 ): // LD D,r
- CASE6( 58, 59, 5A, 5C, 5D, 5F ): // LD E,r
- CASE6( 60, 61, 62, 63, 65, 67 ): // LD H,r
- CASE6( 68, 69, 6A, 6B, 6C, 6F ): // LD L,r
- CASE6( 78, 79, 7A, 7B, 7C, 7D ): // LD A,r
- R8( opcode >> 3 & 7, 0 ) = R8( opcode & 7, 0 );
- goto loop;
-
- CASE5( 06, 0E, 16, 1E, 26 ): // LD r,imm
- R8( opcode >> 3, 0 ) = data;
- pc++;
- goto loop;
-
- case 0x36: // LD (HL),imm
- pc++;
- WRITE_MEM( r.w.hl, data );
- goto loop;
-
- CASE7( 46, 4E, 56, 5E, 66, 6E, 7E ): // LD r,(HL)
- R8( opcode >> 3, 8 ) = READ_MEM( r.w.hl );
- goto loop;
-
- case 0x01: // LD r.w,imm
- case 0x11:
- case 0x21:
- R16( opcode, 4, 0x01 ) = GET_ADDR();
- pc += 2;
- goto loop;
-
- case 0x31: // LD sp,imm
- sp = GET_ADDR();
- pc += 2;
- goto loop;
-
- case 0x2A:{// LD HL,(addr)
- int addr = GET_ADDR();
- pc += 2;
- r.w.hl = READ_WORD( addr );
- goto loop;
- }
-
- case 0x32:{// LD (addr),A
- int addr = GET_ADDR();
- pc += 2;
- WRITE_MEM( addr, r.b.a );
- goto loop;
- }
-
- case 0x22:{// LD (addr),HL
- int addr = GET_ADDR();
- pc += 2;
- WRITE_WORD( addr, r.w.hl );
- goto loop;
- }
-
- case 0x02: // LD (BC),A
- case 0x12: // LD (DE),A
- WRITE_MEM( R16( opcode, 4, 0x02 ), r.b.a );
- goto loop;
-
- case 0x0A: // LD A,(BC)
- case 0x1A: // LD A,(DE)
- r.b.a = READ_MEM( R16( opcode, 4, 0x0A ) );
- goto loop;
-
- case 0xF9: // LD SP,HL
- sp = r.w.hl;
- goto loop;
-
-// Rotate
-
- case 0x07:{// RLCA
- int temp = r.b.a;
- temp = (temp << 1) + (temp >> 7);
- flags = (flags & (S80 | Z40 | P04)) +
- (temp & (F20 | F08 | C01));
- r.b.a = temp;
- goto loop;
- }
-
- case 0x0F:{// RRCA
- int temp = r.b.a;
- flags = (flags & (S80 | Z40 | P04)) +
- (temp & C01);
- temp = (temp << 7) + (temp >> 1);
- flags += temp & (F20 | F08);
- r.b.a = temp;
- goto loop;
- }
-
- case 0x17:{// RLA
- int temp = (r.b.a << 1) + (flags & C01);
- flags = (flags & (S80 | Z40 | P04)) +
- (temp & (F20 | F08)) +
- (temp >> 8);
- r.b.a = temp;
- goto loop;
- }
-
- case 0x1F:{// RRA
- int temp = (flags << 7) + (r.b.a >> 1);
- flags = (flags & (S80 | Z40 | P04)) +
- (temp & (F20 | F08)) +
- (r.b.a & C01);
- r.b.a = temp;
- goto loop;
- }
-
-// Misc
- case 0x2F:{// CPL
- int temp = ~r.b.a;
- flags = (flags & (S80 | Z40 | P04 | C01)) +
- (temp & (F20 | F08)) +
- (H10 | N02);
- r.b.a = temp;
- goto loop;
- }
-
- case 0x3F:{// CCF
- flags = ((flags & (S80 | Z40 | P04 | C01)) ^ C01) +
- (flags << 4 & H10) +
- (r.b.a & (F20 | F08));
- goto loop;
- }
-
- case 0x37: // SCF
- flags = ((flags & (S80 | Z40 | P04)) | C01) +
- (r.b.a & (F20 | F08));
- goto loop;
-
- case 0xDB: // IN A,(imm)
- pc++;
- r.b.a = IN_PORT( (data + r.b.a * 0x100) );
- goto loop;
-
- case 0xE3:{// EX (SP),HL
- int temp = READ_WORD( sp );
- WRITE_WORD( sp, r.w.hl );
- r.w.hl = temp;
- goto loop;
- }
-
- case 0xEB: // EX DE,HL
- EX( r.w.hl, r.w.de );
- goto loop;
-
- case 0xD9: // EXX DE,HL
- EXX( w.bc );
- EXX( w.de );
- EXX( w.hl );
- goto loop;
-
- case 0xF3: // DI
- R.iff1 = 0;
- R.iff2 = 0;
- goto loop;
-
- case 0xFB: // EI
- R.iff1 = 1;
- R.iff2 = 1;
- // TODO: delayed effect
- goto loop;
-
- case 0x76: // HALT
- goto halt;
-
-//////////////////////////////////////// CB prefix
- {
- case 0xCB:
- pc++;
- switch ( data )
- {
-
- // Rotate left
-
- #define RLC( read, write ) {\
- int result = read;\
- result = BYTE( result << 1 ) + (result >> 7);\
- flags = SZ28P( result ) + (result & C01);\
- write;\
- goto loop;\
- }
-
- case 0x06: // RLC (HL)
- s_time += 7;
- data = r.w.hl;
- rlc_data_addr:
- RLC( READ_MEM( data ), WRITE_MEM( data, result ) )
-
- CASE7( 00, 01, 02, 03, 04, 05, 07 ):{// RLC r
- byte* reg = &R8( data, 0 );
- RLC( *reg, *reg = result )
- }
-
- #define RL( read, write ) {\
- int result = (read << 1) + (flags & C01);\
- flags = SZ28PC( result );\
- write;\
- goto loop;\
- }
-
- case 0x16: // RL (HL)
- s_time += 7;
- data = r.w.hl;
- rl_data_addr:
- RL( READ_MEM( data ), WRITE_MEM( data, result ) )
-
- CASE7( 10, 11, 12, 13, 14, 15, 17 ):{// RL r
- byte* reg = &R8( data, 0x10 );
- RL( *reg, *reg = result )
- }
-
- #define SLA( read, low_bit, write ) {\
- int result = (read << 1) + low_bit;\
- flags = SZ28PC( result );\
- write;\
- goto loop;\
- }
-
- case 0x26: // SLA (HL)
- s_time += 7;
- data = r.w.hl;
- sla_data_addr:
- SLA( READ_MEM( data ), 0, WRITE_MEM( data, result ) )
-
- CASE7( 20, 21, 22, 23, 24, 25, 27 ):{// SLA r
- byte* reg = &R8( data, 0x20 );
- SLA( *reg, 0, *reg = result )
- }
-
- case 0x36: // SLL (HL)
- s_time += 7;
- data = r.w.hl;
- sll_data_addr:
- SLA( READ_MEM( data ), 1, WRITE_MEM( data, result ) )
-
- CASE7( 30, 31, 32, 33, 34, 35, 37 ):{// SLL r
- byte* reg = &R8( data, 0x30 );
- SLA( *reg, 1, *reg = result )
- }
-
- // Rotate right
-
- #define RRC( read, write ) {\
- int result = read;\
- flags = result & C01;\
- result = BYTE( result << 7 ) + (result >> 1);\
- flags += SZ28P( result );\
- write;\
- goto loop;\
- }
-
- case 0x0E: // RRC (HL)
- s_time += 7;
- data = r.w.hl;
- rrc_data_addr:
- RRC( READ_MEM( data ), WRITE_MEM( data, result ) )
-
- CASE7( 08, 09, 0A, 0B, 0C, 0D, 0F ):{// RRC r
- byte* reg = &R8( data, 0x08 );
- RRC( *reg, *reg = result )
- }
-
- #define RR( read, write ) {\
- int result = read;\
- int temp = result & C01;\
- result = BYTE( flags << 7 ) + (result >> 1);\
- flags = SZ28P( result ) + temp;\
- write;\
- goto loop;\
- }
-
- case 0x1E: // RR (HL)
- s_time += 7;
- data = r.w.hl;
- rr_data_addr:
- RR( READ_MEM( data ), WRITE_MEM( data, result ) )
-
- CASE7( 18, 19, 1A, 1B, 1C, 1D, 1F ):{// RR r
- byte* reg = &R8( data, 0x18 );
- RR( *reg, *reg = result )
- }
-
- #define SRA( read, write ) {\
- int result = read;\
- flags = result & C01;\
- result = (result & 0x80) + (result >> 1);\
- flags += SZ28P( result );\
- write;\
- goto loop;\
- }
-
- case 0x2E: // SRA (HL)
- data = r.w.hl;
- s_time += 7;
- sra_data_addr:
- SRA( READ_MEM( data ), WRITE_MEM( data, result ) )
-
- CASE7( 28, 29, 2A, 2B, 2C, 2D, 2F ):{// SRA r
- byte* reg = &R8( data, 0x28 );
- SRA( *reg, *reg = result )
- }
-
- #define SRL( read, write ) {\
- int result = read;\
- flags = result & C01;\
- result >>= 1;\
- flags += SZ28P( result );\
- write;\
- goto loop;\
- }
-
- case 0x3E: // SRL (HL)
- s_time += 7;
- data = r.w.hl;
- srl_data_addr:
- SRL( READ_MEM( data ), WRITE_MEM( data, result ) )
-
- CASE7( 38, 39, 3A, 3B, 3C, 3D, 3F ):{// SRL r
- byte* reg = &R8( data, 0x38 );
- SRL( *reg, *reg = result )
- }
-
- // BIT
- {
- int temp;
- CASE8( 46, 4E, 56, 5E, 66, 6E, 76, 7E ): // BIT b,(HL)
- s_time += 4;
- temp = READ_MEM( r.w.hl );
- flags &= C01;
- goto bit_temp;
- CASE7( 40, 41, 42, 43, 44, 45, 47 ): // BIT 0,r
- CASE7( 48, 49, 4A, 4B, 4C, 4D, 4F ): // BIT 1,r
- CASE7( 50, 51, 52, 53, 54, 55, 57 ): // BIT 2,r
- CASE7( 58, 59, 5A, 5B, 5C, 5D, 5F ): // BIT 3,r
- CASE7( 60, 61, 62, 63, 64, 65, 67 ): // BIT 4,r
- CASE7( 68, 69, 6A, 6B, 6C, 6D, 6F ): // BIT 5,r
- CASE7( 70, 71, 72, 73, 74, 75, 77 ): // BIT 6,r
- CASE7( 78, 79, 7A, 7B, 7C, 7D, 7F ): // BIT 7,r
- temp = R8( data & 7, 0 );
- flags = (flags & C01) + (temp & (F20 | F08));
- bit_temp:
- temp = temp & (1 << (data >> 3 & 7));
- flags += (temp & S80) + H10;
- flags += (unsigned) --temp >> 8 & (Z40 | P04);
- goto loop;
- }
-
- // SET/RES
- CASE8( 86, 8E, 96, 9E, A6, AE, B6, BE ): // RES b,(HL)
- CASE8( C6, CE, D6, DE, E6, EE, F6, FE ):{// SET b,(HL)
- s_time += 7;
- int temp = READ_MEM( r.w.hl );
- int bit = 1 << (data >> 3 & 7);
- temp |= bit; // SET
- if ( !(data & 0x40) )
- temp ^= bit; // RES
- WRITE_MEM( r.w.hl, temp );
- goto loop;
- }
-
- CASE7( C0, C1, C2, C3, C4, C5, C7 ): // SET 0,r
- CASE7( C8, C9, CA, CB, CC, CD, CF ): // SET 1,r
- CASE7( D0, D1, D2, D3, D4, D5, D7 ): // SET 2,r
- CASE7( D8, D9, DA, DB, DC, DD, DF ): // SET 3,r
- CASE7( E0, E1, E2, E3, E4, E5, E7 ): // SET 4,r
- CASE7( E8, E9, EA, EB, EC, ED, EF ): // SET 5,r
- CASE7( F0, F1, F2, F3, F4, F5, F7 ): // SET 6,r
- CASE7( F8, F9, FA, FB, FC, FD, FF ): // SET 7,r
- R8( data & 7, 0 ) |= 1 << (data >> 3 & 7);
- goto loop;
-
- CASE7( 80, 81, 82, 83, 84, 85, 87 ): // RES 0,r
- CASE7( 88, 89, 8A, 8B, 8C, 8D, 8F ): // RES 1,r
- CASE7( 90, 91, 92, 93, 94, 95, 97 ): // RES 2,r
- CASE7( 98, 99, 9A, 9B, 9C, 9D, 9F ): // RES 3,r
- CASE7( A0, A1, A2, A3, A4, A5, A7 ): // RES 4,r
- CASE7( A8, A9, AA, AB, AC, AD, AF ): // RES 5,r
- CASE7( B0, B1, B2, B3, B4, B5, B7 ): // RES 6,r
- CASE7( B8, B9, BA, BB, BC, BD, BF ): // RES 7,r
- R8( data & 7, 0 ) &= ~(1 << (data >> 3 & 7));
- goto loop;
- }
- assert( false );
- }
-
-#undef GET_ADDR
-#define GET_ADDR() GET_LE16( &INSTR( 1, pc ) )
-
-//////////////////////////////////////// ED prefix
- {
- case 0xED:
- pc++;
- s_time += (clock_table + 256) [data] >> 4;
- switch ( data )
- {
- {
- int temp;
- case 0x72: // SBC HL,SP
- case 0x7A: // ADC HL,SP
- temp = sp;
- if ( 0 )
- case 0x42: // SBC HL,BC
- case 0x52: // SBC HL,DE
- case 0x62: // SBC HL,HL
- case 0x4A: // ADC HL,BC
- case 0x5A: // ADC HL,DE
- case 0x6A: // ADC HL,HL
- temp = R16( data >> 3 & 6, 1, 0 );
- int sum = temp + (flags & C01);
- flags = ~data >> 2 & N02;
- if ( flags )
- sum = -sum;
- sum += r.w.hl;
- temp ^= r.w.hl;
- temp ^= sum;
- flags +=(sum >> 16 & C01) +
- (temp >> 8 & H10) +
- (sum >> 8 & (S80 | F20 | F08)) +
- ((temp + 0x8000) >> 14 & V04);
- r.w.hl = sum;
- if ( WORD( sum ) )
- goto loop;
- flags += Z40;
- goto loop;
- }
-
- CASE8( 40, 48, 50, 58, 60, 68, 70, 78 ):{// IN r,(C)
- int temp = IN_PORT( r.w.bc );
- R8( data >> 3, 8 ) = temp;
- flags = (flags & C01) + SZ28P( temp );
- goto loop;
- }
-
- case 0x71: // OUT (C),0
- r.b.flags = 0;
- CASE7( 41, 49, 51, 59, 61, 69, 79 ): // OUT (C),r
- OUT_PORT( r.w.bc, R8( data >> 3, 8 ) );
- goto loop;
-
- {
- int temp;
- case 0x73: // LD (ADDR),SP
- temp = sp;
- if ( 0 )
- case 0x43: // LD (ADDR),BC
- case 0x53: // LD (ADDR),DE
- temp = R16( data, 4, 0x43 );
- int addr = GET_ADDR();
- pc += 2;
- WRITE_WORD( addr, temp );
- goto loop;
- }
-
- case 0x4B: // LD BC,(ADDR)
- case 0x5B:{// LD DE,(ADDR)
- int addr = GET_ADDR();
- pc += 2;
- R16( data, 4, 0x4B ) = READ_WORD( addr );
- goto loop;
- }
-
- case 0x7B:{// LD SP,(ADDR)
- int addr = GET_ADDR();
- pc += 2;
- sp = READ_WORD( addr );
- goto loop;
- }
-
- case 0x67:{// RRD
- int temp = READ_MEM( r.w.hl );
- WRITE_MEM( r.w.hl, ((r.b.a << 4) + (temp >> 4)) );
- temp = (r.b.a & 0xF0) + (temp & 0x0F);
- flags = (flags & C01) + SZ28P( temp );
- r.b.a = temp;
- goto loop;
- }
-
- case 0x6F:{// RLD
- int temp = READ_MEM( r.w.hl );
- WRITE_MEM( r.w.hl, ((temp << 4) + (r.b.a & 0x0F)) );
- temp = (r.b.a & 0xF0) + (temp >> 4);
- flags = (flags & C01) + SZ28P( temp );
- r.b.a = temp;
- goto loop;
- }
-
- CASE8( 44, 4C, 54, 5C, 64, 6C, 74, 7C ): // NEG
- opcode = 0x10; // flag to do SBC instead of ADC
- flags &= ~C01;
- data = r.b.a;
- r.b.a = 0;
- goto adc_data;
-
- {
- int inc;
- case 0xA9: // CPD
- case 0xB9: // CPDR
- inc = -1;
- if ( 0 )
- case 0xA1: // CPI
- case 0xB1: // CPIR
- inc = +1;
- int addr = r.w.hl;
- r.w.hl = addr + inc;
- int temp = READ_MEM( addr );
-
- int result = r.b.a - temp;
- flags = (flags & C01) + N02 +
- ((((temp ^ r.b.a) & H10) ^ result) & (S80 | H10));
-
- if ( !BYTE( result ) )
- flags += Z40;
- result -= (flags & H10) >> 4;
- flags += result & F08;
- flags += result << 4 & F20;
- if ( !--r.w.bc )
- goto loop;
-
- flags += V04;
- if ( flags & Z40 || data < 0xB0 )
- goto loop;
-
- pc -= 2;
- s_time += 5;
- goto loop;
- }
-
- {
- int inc;
- case 0xA8: // LDD
- case 0xB8: // LDDR
- inc = -1;
- if ( 0 )
- case 0xA0: // LDI
- case 0xB0: // LDIR
- inc = +1;
- int addr = r.w.hl;
- r.w.hl = addr + inc;
- int temp = READ_MEM( addr );
-
- addr = r.w.de;
- r.w.de = addr + inc;
- WRITE_MEM( addr, temp );
-
- temp += r.b.a;
- flags = (flags & (S80 | Z40 | C01)) +
- (temp & F08) + (temp << 4 & F20);
- if ( !--r.w.bc )
- goto loop;
-
- flags += V04;
- if ( data < 0xB0 )
- goto loop;
-
- pc -= 2;
- s_time += 5;
- goto loop;
- }
-
- {
- int inc;
- case 0xAB: // OUTD
- case 0xBB: // OTDR
- inc = -1;
- if ( 0 )
- case 0xA3: // OUTI
- case 0xB3: // OTIR
- inc = +1;
- int addr = r.w.hl;
- r.w.hl = addr + inc;
- int temp = READ_MEM( addr );
-
- int b = --r.b.b;
- flags = (temp >> 6 & N02) + SZ28( b );
- if ( b && data >= 0xB0 )
- {
- pc -= 2;
- s_time += 5;
- }
-
- OUT_PORT( r.w.bc, temp );
- goto loop;
- }
-
- {
- int inc;
- case 0xAA: // IND
- case 0xBA: // INDR
- inc = -1;
- if ( 0 )
- case 0xA2: // INI
- case 0xB2: // INIR
- inc = +1;
-
- int addr = r.w.hl;
- r.w.hl = addr + inc;
-
- int temp = IN_PORT( r.w.bc );
-
- int b = --r.b.b;
- flags = (temp >> 6 & N02) + SZ28( b );
- if ( b && data >= 0xB0 )
- {
- pc -= 2;
- s_time += 5;
- }
-
- WRITE_MEM( addr, temp );
- goto loop;
- }
-
- case 0x47: // LD I,A
- R.i = r.b.a;
- goto loop;
-
- case 0x4F: // LD R,A
- SET_R( r.b.a );
- dprintf( "LD R,A not supported\n" );
- warning = true;
- goto loop;
-
- case 0x57: // LD A,I
- r.b.a = R.i;
- goto ld_ai_common;
-
- case 0x5F: // LD A,R
- r.b.a = GET_R();
- dprintf( "LD A,R not supported\n" );
- warning = true;
- ld_ai_common:
- flags = (flags & C01) + SZ28( r.b.a ) + (R.iff2 << 2 & V04);
- goto loop;
-
- CASE8( 45, 4D, 55, 5D, 65, 6D, 75, 7D ): // RETI/RETN
- R.iff1 = R.iff2;
- goto ret_taken;
-
- case 0x46: case 0x4E: case 0x66: case 0x6E: // IM 0
- R.im = 0;
- goto loop;
-
- case 0x56: case 0x76: // IM 1
- R.im = 1;
- goto loop;
-
- case 0x5E: case 0x7E: // IM 2
- R.im = 2;
- goto loop;
-
- default:
- dprintf( "Opcode $ED $%02X not supported\n", data );
- warning = true;
- goto loop;
- }
- assert( false );
- }
-
-//////////////////////////////////////// DD/FD prefix
- {
- int ixy;
- case 0xDD:
- ixy = ix;
- goto ix_prefix;
- case 0xFD:
- ixy = iy;
- ix_prefix:
- pc++;
- int data2 = READ_CODE( pc );
- s_time += (clock_table + 256) [data] & 0x0F;
- switch ( data )
- {
- // TODO: more efficient way of avoid negative address
- // TODO: avoid using this as argument to READ_MEM() since it is evaluated twice
- #define IXY_DISP( ixy, disp ) WORD( (ixy ) + (disp))
-
- #define SET_IXY( in ) if ( opcode == 0xDD ) ix = in; else iy = in;
-
- // ADD/ADC/SUB/SBC
-
- case 0x96: // SUB (IXY+disp)
- case 0x86: // ADD (IXY+disp)
- flags &= ~C01;
- case 0x9E: // SBC (IXY+disp)
- case 0x8E: // ADC (IXY+disp)
- pc++;
- opcode = data;
- data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) );
- goto adc_data;
-
- case 0x94: // SUB HXY
- case 0x84: // ADD HXY
- flags &= ~C01;
- case 0x9C: // SBC HXY
- case 0x8C: // ADC HXY
- opcode = data;
- data = ixy >> 8;
- goto adc_data;
-
- case 0x95: // SUB LXY
- case 0x85: // ADD LXY
- flags &= ~C01;
- case 0x9D: // SBC LXY
- case 0x8D: // ADC LXY
- opcode = data;
- data = BYTE( ixy );
- goto adc_data;
-
- {
- int temp;
- case 0x39: // ADD IXY,SP
- temp = sp;
- goto add_ixy_data;
-
- case 0x29: // ADD IXY,HL
- temp = ixy;
- goto add_ixy_data;
-
- case 0x09: // ADD IXY,BC
- case 0x19: // ADD IXY,DE
- temp = R16( data, 4, 0x09 );
- add_ixy_data: {
- int sum = ixy + temp;
- temp ^= ixy;
- ixy = WORD( sum );
- flags = (flags & (S80 | Z40 | V04)) +
- (sum >> 16) +
- (sum >> 8 & (F20 | F08)) +
- ((temp ^ sum) >> 8 & H10);
- goto set_ixy;
- }
- }
-
- // AND
- case 0xA6: // AND (IXY+disp)
- pc++;
- data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) );
- goto and_data;
-
- case 0xA4: // AND HXY
- data = ixy >> 8;
- goto and_data;
-
- case 0xA5: // AND LXY
- data = BYTE( ixy );
- goto and_data;
-
- // OR
- case 0xB6: // OR (IXY+disp)
- pc++;
- data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) );
- goto or_data;
-
- case 0xB4: // OR HXY
- data = ixy >> 8;
- goto or_data;
-
- case 0xB5: // OR LXY
- data = BYTE( ixy );
- goto or_data;
-
- // XOR
- case 0xAE: // XOR (IXY+disp)
- pc++;
- data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) );
- goto xor_data;
-
- case 0xAC: // XOR HXY
- data = ixy >> 8;
- goto xor_data;
-
- case 0xAD: // XOR LXY
- data = BYTE( ixy );
- goto xor_data;
-
- // CP
- case 0xBE: // CP (IXY+disp)
- pc++;
- data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) );
- goto cp_data;
-
- case 0xBC: // CP HXY
- data = ixy >> 8;
- goto cp_data;
-
- case 0xBD: // CP LXY
- data = BYTE( ixy );
- goto cp_data;
-
- // LD
- CASE7( 70, 71, 72, 73, 74, 75, 77 ): // LD (IXY+disp),r
- data = R8( data, 0x70 );
- if ( 0 )
- case 0x36: // LD (IXY+disp),imm
- pc++, data = READ_CODE( pc );
- pc++;
- WRITE_MEM( IXY_DISP( ixy, SBYTE( data2 ) ), data );
- goto loop;
-
- CASE5( 44, 4C, 54, 5C, 7C ): // LD r,HXY
- R8( data >> 3, 8 ) = ixy >> 8;
- goto loop;
-
- case 0x64: // LD HXY,HXY
- case 0x6D: // LD LXY,LXY
- goto loop;
-
- CASE5( 45, 4D, 55, 5D, 7D ): // LD r,LXY
- R8( data >> 3, 8 ) = ixy;
- goto loop;
-
- CASE7( 46, 4E, 56, 5E, 66, 6E, 7E ): // LD r,(IXY+disp)
- pc++;
- R8( data >> 3, 8 ) = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) );
- goto loop;
-
- case 0x26: // LD HXY,imm
- pc++;
- goto ld_hxy_data;
-
- case 0x65: // LD HXY,LXY
- data2 = BYTE( ixy );
- goto ld_hxy_data;
-
- CASE5( 60, 61, 62, 63, 67 ): // LD HXY,r
- data2 = R8( data, 0x60 );
- ld_hxy_data:
- ixy = BYTE( ixy ) + (data2 << 8);
- goto set_ixy;
-
- case 0x2E: // LD LXY,imm
- pc++;
- goto ld_lxy_data;
-
- case 0x6C: // LD LXY,HXY
- data2 = ixy >> 8;
- goto ld_lxy_data;
-
- CASE5( 68, 69, 6A, 6B, 6F ): // LD LXY,r
- data2 = R8( data, 0x68 );
- ld_lxy_data:
- ixy = (ixy & 0xFF00) + data2;
- set_ixy:
- if ( opcode == 0xDD )
- {
- ix = ixy;
- goto loop;
- }
- iy = ixy;
- goto loop;
-
- case 0xF9: // LD SP,IXY
- sp = ixy;
- goto loop;
-
- case 0x22:{// LD (ADDR),IXY
- int addr = GET_ADDR();
- pc += 2;
- WRITE_WORD( addr, ixy );
- goto loop;
- }
-
- case 0x21: // LD IXY,imm
- ixy = GET_ADDR();
- pc += 2;
- goto set_ixy;
-
- case 0x2A:{// LD IXY,(addr)
- int addr = GET_ADDR();
- ixy = READ_WORD( addr );
- pc += 2;
- goto set_ixy;
- }
-
- // DD/FD CB prefix
- case 0xCB: {
- data = IXY_DISP( ixy, SBYTE( data2 ) );
- pc++;
- data2 = READ_CODE( pc );
- pc++;
- switch ( data2 )
- {
- case 0x06: goto rlc_data_addr; // RLC (IXY)
- case 0x16: goto rl_data_addr; // RL (IXY)
- case 0x26: goto sla_data_addr; // SLA (IXY)
- case 0x36: goto sll_data_addr; // SLL (IXY)
- case 0x0E: goto rrc_data_addr; // RRC (IXY)
- case 0x1E: goto rr_data_addr; // RR (IXY)
- case 0x2E: goto sra_data_addr; // SRA (IXY)
- case 0x3E: goto srl_data_addr; // SRL (IXY)
-
- CASE8( 46, 4E, 56, 5E, 66, 6E, 76, 7E ):{// BIT b,(IXY+disp)
- int temp = READ_MEM( data );
- temp = temp & (1 << (data2 >> 3 & 7));
- flags = (flags & C01) + H10 + (temp & S80);
- flags += (unsigned) --temp >> 8 & (Z40 | P04);
- goto loop;
- }
-
- CASE8( 86, 8E, 96, 9E, A6, AE, B6, BE ): // RES b,(IXY+disp)
- CASE8( C6, CE, D6, DE, E6, EE, F6, FE ):{// SET b,(IXY+disp)
- int temp = READ_MEM( data );
- int bit = 1 << (data2 >> 3 & 7);
- temp |= bit; // SET
- if ( !(data2 & 0x40) )
- temp ^= bit; // RES
- WRITE_MEM( data, temp );
- goto loop;
- }
-
- default:
- dprintf( "Opcode $%02X $CB $%02X not supported\n", opcode, data2 );
- warning = true;
- goto loop;
- }
- assert( false );
- }
-
- // INC/DEC
- case 0x23: // INC IXY
- ixy = WORD( ixy + 1 );
- goto set_ixy;
-
- case 0x2B: // DEC IXY
- ixy = WORD( ixy - 1 );
- goto set_ixy;
-
- case 0x34: // INC (IXY+disp)
- ixy = IXY_DISP( ixy, SBYTE( data2 ) );
- pc++;
- data = READ_MEM( ixy ) + 1;
- WRITE_MEM( ixy, data );
- goto inc_set_flags;
-
- case 0x35: // DEC (IXY+disp)
- ixy = IXY_DISP( ixy, SBYTE( data2 ) );
- pc++;
- data = READ_MEM( ixy ) - 1;
- WRITE_MEM( ixy, data );
- goto dec_set_flags;
-
- case 0x24: // INC HXY
- ixy = WORD( ixy + 0x100 );
- data = ixy >> 8;
- goto inc_xy_common;
-
- case 0x2C: // INC LXY
- data = BYTE( ixy + 1 );
- ixy = (ixy & 0xFF00) + data;
- inc_xy_common:
- if ( opcode == 0xDD )
- {
- ix = ixy;
- goto inc_set_flags;
- }
- iy = ixy;
- goto inc_set_flags;
-
- case 0x25: // DEC HXY
- ixy = WORD( ixy - 0x100 );
- data = ixy >> 8;
- goto dec_xy_common;
-
- case 0x2D: // DEC LXY
- data = BYTE( ixy - 1 );
- ixy = (ixy & 0xFF00) + data;
- dec_xy_common:
- if ( opcode == 0xDD )
- {
- ix = ixy;
- goto dec_set_flags;
- }
- iy = ixy;
- goto dec_set_flags;
-
- // PUSH/POP
- case 0xE5: // PUSH IXY
- data = ixy;
- goto push_data;
-
- case 0xE1:{// POP IXY
- ixy = READ_WORD( sp );
- sp = WORD( sp + 2 );
- goto set_ixy;
- }
-
- // Misc
-
- case 0xE9: // JP (IXY)
- pc = ixy;
- goto loop;
-
- case 0xE3:{// EX (SP),IXY
- int temp = READ_WORD( sp );
- WRITE_WORD( sp, ixy );
- ixy = temp;
- goto set_ixy;
- }
-
- default:
- dprintf( "Unnecessary DD/FD prefix encountered\n" );
- warning = true;
- pc--;
- goto loop;
- }
- assert( false );
- }
-
- }
- dprintf( "Unhandled main opcode: $%02X\n", opcode );
- assert( false );
-
-#ifdef IDLE_ADDR
-hit_idle_addr:
- s_time -= 11;
- goto out_of_time;
-#endif
-halt:
- s_time &= 3; // increment by multiple of 4
-out_of_time:
- pc--;
-
- r.b.flags = flags;
- R.ix = ix;
- R.iy = iy;
- R.sp = sp;
- R.pc = pc;
- R.b = r.b;
-
- cpu->cpu_state_.base = s.base;
- cpu->cpu_state_.time = s_time;
- cpu->cpu_state = &cpu->cpu_state_;
-}
+// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/ + +// Last validated with zexall 2009.12.05. +// Doesn't implement the R register or immediate interrupt after EI. +// Address wrap-around isn't completely correct, but is prevented from crashing emulator. +// 16-bit memory accesses are made directly to mapped memory, instead of using macro. + +#if 0 +/* Define these macros in the source file before #including this file. +- Parameters might be expressions, so they are best evaluated only once, +though they NEVER have side-effects, so multiple evaluation is OK. +- Output parameters might be a multiple-assignment expression like "a=x", +so they must NOT be parenthesized. +- Except where noted, time() and related functions will NOT work +correctly inside a macro. TIME() is always correct, and between FLUSH_TIME() and +CACHE_TIME() the normal time changing functions can be used. +- Macros "returning" void may use a {} statement block. */ + + // 0 <= addr <= 0xFFFF + 0x100 + // Optional; default uses whatever was set with map_mem() + int READ_MEM( addr_t ); + void WRITE_MEM( addr_t, int data ); + + // 0 <= port <= 0xFFFF (apparently upper 8 bits are output by hardware) + void OUT_PORT( int port, int data ); + int IN_PORT int port ); + + // Reference to Z80_Cpu object used for emulation + #define CPU cpu + +// The following can be used within macros: + + // Current time + time_t TIME(); + + // Allows use of time functions + void FLUSH_TIME(); + + // Must be used before end of macro if FLUSH_TIME() was used earlier + void CACHE_TIME(); + +// Configuration (optional; commented behavior if defined) + + // Optimizes as if map_mem( 0, 0x10000, FLAT_MEM, FLAT_MEM ) is always in effect + #define FLAT_MEM my_mem_array + + // If RST 7 ($FF) is encountered and PC = IDLE_ADDR, stops execution + #define IDLE_ADDR 0x1234 + + // Expanded just before beginning of code, to help debugger + #define CPU_BEGIN void my_run_cpu() { + +#endif + +/* Copyright (C) 2006-2008 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 +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#ifdef CPU_BEGIN + CPU_BEGIN +#endif + +#define R cpu->r + +// flags, named with hex value for clarity +int const S80 = 0x80; +int const Z40 = 0x40; +int const F20 = 0x20; +int const H10 = 0x10; +int const F08 = 0x08; +int const V04 = 0x04; +int const P04 = 0x04; +int const N02 = 0x02; +int const C01 = 0x01; + +#define SZ28P( n ) cpu->szpc [n] +#define SZ28PC( n ) cpu->szpc [n] +#define SZ28C( n ) (cpu->szpc [n] & ~P04) +#define SZ28( n ) SZ28C( n ) + +#define SET_R( n ) (void) (R.r = n) +#define GET_R() (R.r) + +// Time +#define TIME() (s_time + s.base) +#define FLUSH_TIME() {s.time = s_time;} +#define CACHE_TIME() {s_time = s.time;} + +// Memory +#define RW_MEM( addr, rw ) RW_PAGE( addr, rw ) [RW_OFFSET( addr )] +#define READ_CODE( addr ) RW_MEM( addr, read ) + +#ifdef FLAT_MEM + #define RW_PAGE( addr, rw ) FLAT_MEM + #define RW_OFFSET( addr ) (addr) + #define INSTR( off, addr ) READ_CODE( addr ) +#else + #define RW_PAGE( addr, rw ) s.rw [(unsigned) (addr) >> page_bits] + #define RW_OFFSET( addr ) Z80_CPU_OFFSET( addr ) + #define INSTR( off, addr ) instr [off] +#endif + +#ifndef READ_MEM + #define READ_MEM( addr ) RW_MEM( addr, read ) +#endif + +#ifndef WRITE_MEM + #define WRITE_MEM( addr, data ) (RW_MEM( addr, write ) = data) +#endif + +#define READ_WORD( addr ) GET_LE16( &RW_MEM( addr, read ) ) +#define WRITE_WORD( addr, data ) SET_LE16( &RW_MEM( addr, write ), data ) + +// Truncation +#define BYTE( n ) ((uint8_t ) (n)) /* (unsigned) n & 0xFF */ +#define SBYTE( n ) ((int8_t ) (n)) /* (BYTE( n ) ^ 0x80) - 0x80 */ +#define WORD( n ) ((uint16_t) (n)) /* (unsigned) n & 0xFFFF */ + +// Misc +#define CASE5( a, b, c, d, e ) case 0x##a:case 0x##b:case 0x##c:case 0x##d:case 0x##e +#define CASE6( a, b, c, d, e, f ) CASE5( a, b, c, d, e ): case 0x##f +#define CASE7( a, b, c, d, e, f, g ) CASE6( a, b, c, d, e, f ): case 0x##g +#define CASE8( a, b, c, d, e, f, g, h ) CASE7( a, b, c, d, e, f, g ): case 0x##h + +#ifdef BLARGG_BIG_ENDIAN + #define R8( n, offset ) ((r.r8_ - offset) [n]) +#elif BLARGG_LITTLE_ENDIAN + #define R8( n, offset ) ((r.r8_ - offset) [(n) ^ 1]) +#else + #error "Byte order of CPU must be known" +#endif + +#define R16( n, shift, offset ) (r.r16_ [((unsigned) (n) >> shift) - (offset >> shift)]) + +#define EX( x, y ) \ + {\ + int temp = x;\ + x = y;\ + y = temp;\ + } + +#define EXX( name ) \ + EX( R.alt.name, r.name ) + +bool warning = false; +{ + struct cpu_state_t s; + #ifdef FLAT_MEM + s.base = cpu->cpu_state_.base; + #else + s = cpu->cpu_state_; + #endif + cpu->cpu_state = &s; + + + union r_t { + struct regs_t b; + struct pairs_t w; + byte r8_ [8]; // indexed + uint16_t r16_ [4]; + } r; + r.b = R.b; + + cpu_time_t s_time = cpu->cpu_state_.time; + int pc = R.pc; + int sp = R.sp; + int ix = R.ix; // TODO: keep in memory for direct access? + int iy = R.iy; + int flags = R.b.flags; + + //goto loop; // confuses optimizer + s_time += 7; + pc -= 2; + +call_not_taken: + s_time -= 7; +jp_not_taken: + pc += 2; +loop: + + check( (unsigned) pc < 0x10000 + 1 ); // +1 so emulator can catch wrap-around + check( (unsigned) sp < 0x10000 ); + check( (unsigned) flags < 0x100 ); + check( (unsigned) ix < 0x10000 ); + check( (unsigned) iy < 0x10000 ); + + byte const* instr = RW_PAGE( pc, read ); + + int opcode; + + if ( RW_OFFSET( ~0 ) == ~0 ) + { + opcode = instr [RW_OFFSET( pc )]; + pc++; + instr += RW_OFFSET( pc ); + } + else + { + instr += RW_OFFSET( pc ); + opcode = *instr++; + pc++; + } + + static byte const clock_table [256 * 2] = { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 4,10, 7, 6, 4, 4, 7, 4, 4,11, 7, 6, 4, 4, 7, 4, // 0 + 8,10, 7, 6, 4, 4, 7, 4,12,11, 7, 6, 4, 4, 7, 4, // 1 + 7,10,16, 6, 4, 4, 7, 4, 7,11,16, 6, 4, 4, 7, 4, // 2 + 7,10,13, 6,11,11,10, 4, 7,11,13, 6, 4, 4, 7, 4, // 3 + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 4 + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 5 + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 6 + 7, 7, 7, 7, 7, 7, 4, 7, 4, 4, 4, 4, 4, 4, 7, 4, // 7 + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 8 + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // 9 + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // A + 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, // B + 11,10,10,10,17,11, 7,11,11,10,10, 8,17,17, 7,11, // C + 11,10,10,11,17,11, 7,11,11, 4,10,11,17, 8, 7,11, // D + 11,10,10,19,17,11, 7,11,11, 4,10, 4,17, 8, 7,11, // E + 11,10,10, 4,17,11, 7,11,11, 6,10, 4,17, 8, 7,11, // F + + // high four bits are $ED time - 8, low four bits are $DD/$FD time - 8 + //0 1 2 3 4 5 6 7 8 9 A B C D E F + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x06,0x0C,0x02,0x00,0x00,0x03,0x00,0x00,0x07,0x0C,0x02,0x00,0x00,0x03,0x00, + 0x00,0x00,0x00,0x00,0x0F,0x0F,0x0B,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10, + 0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x10, + 0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0xA0,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0xA0, + 0x4B,0x4B,0x7B,0xCB,0x0B,0x6B,0x00,0x0B,0x40,0x40,0x70,0xC0,0x00,0x60,0x0B,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x00, + 0x80,0x80,0x80,0x80,0x00,0x00,0x0B,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0B,0x00, + 0xD0,0xD0,0xD0,0xD0,0x00,0x00,0x0B,0x00,0xD0,0xD0,0xD0,0xD0,0x00,0x00,0x0B,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x06,0x00,0x0F,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00, + }; + + if ( s_time >= 0 ) + goto out_of_time; + s_time += clock_table [opcode]; + + #ifdef Z80_CPU_LOG_H + //log_opcode( opcode, READ_CODE( pc ) ); + z80_cpu_log( "log.txt", pc - 1, opcode, READ_CODE( pc ), + READ_CODE( pc + 1 ), READ_CODE( pc + 2 ) ); + z80_log_regs( r.b.a, r.w.bc, r.w.de, r.w.hl, sp, ix, iy ); + #endif + +#define GET_ADDR() GET_LE16( &INSTR( 0, pc ) ) + + int data; + data = INSTR( 0, pc ); + + switch ( opcode ) + { +// Common + + case 0x00: // NOP + CASE7( 40, 49, 52, 5B, 64, 6D, 7F ): // LD B,B etc. + goto loop; + + case 0x08:{// EX AF,AF' + EXX( b.a ); + EX( R.alt.b.flags, flags ); + goto loop; + } + + case 0xD3: // OUT (imm),A + pc++; + OUT_PORT( (data + r.b.a * 0x100), r.b.a ); + goto loop; + + case 0x2E: // LD L,imm + pc++; + r.b.l = data; + goto loop; + + case 0x3E: // LD A,imm + pc++; + r.b.a = data; + goto loop; + + case 0x3A:{// LD A,(addr) + int addr = GET_ADDR(); + pc += 2; + r.b.a = READ_MEM( addr ); + goto loop; + } + +// Conditional + +#define ZERO (flags & Z40) +#define CARRY (flags & C01) +#define EVEN (flags & P04) +#define MINUS (flags & S80) + +// JR +// TODO: more efficient way to handle negative branch that wraps PC around +#define JR_( cond, clocks ) {\ + pc++;\ + if ( !(cond) )\ + goto loop;\ + int offset = SBYTE( data );\ + pc = WORD( pc + offset );\ + s_time += clocks;\ + goto loop;\ +} + +#define JR( cond ) JR_( cond, 5 ) + + case 0x20: JR( !ZERO ) // JR NZ,disp + case 0x28: JR( ZERO ) // JR Z,disp + case 0x30: JR( !CARRY ) // JR NC,disp + case 0x38: JR( CARRY ) // JR C,disp + case 0x18: JR_( true,0) // JR disp + + case 0x10:{// DJNZ disp + int temp = r.b.b - 1; + r.b.b = temp; + JR( temp ) + } + +// JP +#define JP( cond ) \ + if ( !(cond) )\ + goto jp_not_taken;\ + pc = GET_ADDR();\ + goto loop; + + case 0xC2: JP( !ZERO ) // JP NZ,addr + case 0xCA: JP( ZERO ) // JP Z,addr + case 0xD2: JP( !CARRY ) // JP NC,addr + case 0xDA: JP( CARRY ) // JP C,addr + case 0xE2: JP( !EVEN ) // JP PO,addr + case 0xEA: JP( EVEN ) // JP PE,addr + case 0xF2: JP( !MINUS ) // JP P,addr + case 0xFA: JP( MINUS ) // JP M,addr + + case 0xC3: // JP addr + pc = GET_ADDR(); + goto loop; + + case 0xE9: // JP HL + pc = r.w.hl; + goto loop; + +// RET +#define RET( cond ) \ + if ( cond )\ + goto ret_taken;\ + s_time -= 6;\ + goto loop; + + case 0xC0: RET( !ZERO ) // RET NZ + case 0xC8: RET( ZERO ) // RET Z + case 0xD0: RET( !CARRY ) // RET NC + case 0xD8: RET( CARRY ) // RET C + case 0xE0: RET( !EVEN ) // RET PO + case 0xE8: RET( EVEN ) // RET PE + case 0xF0: RET( !MINUS ) // RET P + case 0xF8: RET( MINUS ) // RET M + + case 0xC9: // RET + ret_taken: + pc = READ_WORD( sp ); + sp = WORD( sp + 2 ); + goto loop; + +// CALL +#define CALL( cond ) \ + if ( cond )\ + goto call_taken;\ + goto call_not_taken; + + case 0xC4: CALL( !ZERO ) // CALL NZ,addr + case 0xCC: CALL( ZERO ) // CALL Z,addr + case 0xD4: CALL( !CARRY ) // CALL NC,addr + case 0xDC: CALL( CARRY ) // CALL C,addr + case 0xE4: CALL( !EVEN ) // CALL PO,addr + case 0xEC: CALL( EVEN ) // CALL PE,addr + case 0xF4: CALL( !MINUS ) // CALL P,addr + case 0xFC: CALL( MINUS ) // CALL M,addr + + case 0xCD:{// CALL addr + call_taken: { + int addr = pc + 2; + pc = GET_ADDR(); + sp = WORD( sp - 2 ); + WRITE_WORD( sp, addr ); + goto loop; + } + } + + case 0xFF: // RST + #ifdef IDLE_ADDR + if ( pc == IDLE_ADDR + 1 ) + goto hit_idle_addr; + #else + if ( pc > 0x10000 ) + { + pc = WORD( pc - 1 ); + s_time -= 11; + goto loop; + } + #endif + CASE7( C7, CF, D7, DF, E7, EF, F7 ): + data = pc; + pc = opcode & 0x38; + #ifdef RST_BASE + pc += RST_BASE; + #endif + goto push_data; + +// PUSH/POP + case 0xF5: // PUSH AF + data = r.b.a * 0x100u + flags; + goto push_data; + + case 0xC5: // PUSH BC + case 0xD5: // PUSH DE + case 0xE5: // PUSH HL + data = R16( opcode, 4, 0xC5 ); + push_data: + sp = WORD( sp - 2 ); + WRITE_WORD( sp, data ); + goto loop; + + case 0xF1: // POP AF + flags = READ_MEM( sp ); + r.b.a = READ_MEM( (sp + 1) ); + sp = WORD( sp + 2 ); + goto loop; + + case 0xC1: // POP BC + case 0xD1: // POP DE + case 0xE1: // POP HL + R16( opcode, 4, 0xC1 ) = READ_WORD( sp ); + sp = WORD( sp + 2 ); + goto loop; + +// ADC/ADD/SBC/SUB + case 0x96: // SUB (HL) + case 0x86: // ADD (HL) + flags &= ~C01; + case 0x9E: // SBC (HL) + case 0x8E: // ADC (HL) + data = READ_MEM( r.w.hl ); + goto adc_data; + + case 0xD6: // SUB A,imm + case 0xC6: // ADD imm + flags &= ~C01; + case 0xDE: // SBC A,imm + case 0xCE: // ADC imm + pc++; + goto adc_data; + + CASE7( 90, 91, 92, 93, 94, 95, 97 ): // SUB r + CASE7( 80, 81, 82, 83, 84, 85, 87 ): // ADD r + flags &= ~C01; + CASE7( 98, 99, 9A, 9B, 9C, 9D, 9F ): // SBC r + CASE7( 88, 89, 8A, 8B, 8C, 8D, 8F ): // ADC r + data = R8( opcode & 7, 0 ); + adc_data: { + int result = data + (flags & C01); + data ^= r.b.a; + flags = opcode >> 3 & N02; // bit 4 is set in subtract opcodes + if ( flags ) + result = -result; + result += r.b.a; + data ^= result; + flags +=(data & H10) + + ((data + 0x80) >> 6 & V04) + + SZ28C( result & 0x1FF ); + r.b.a = result; + goto loop; + } + +// CP + case 0xBE: // CP (HL) + data = READ_MEM( r.w.hl ); + goto cp_data; + + case 0xFE: // CP imm + pc++; + goto cp_data; + + CASE7( B8, B9, BA, BB, BC, BD, BF ): // CP r + data = R8( opcode, 0xB8 ); + cp_data: { + int result = r.b.a - data; + flags = N02 + (data & (F20 | F08)) + (result >> 8 & C01); + data ^= r.b.a; + flags +=(((result ^ r.b.a) & data) >> 5 & V04) + + (((data & H10) ^ result) & (S80 | H10)); + if ( BYTE( result ) ) + goto loop; + flags += Z40; + goto loop; + } + +// ADD HL,r.w + + case 0x39: // ADD HL,SP + data = sp; + goto add_hl_data; + + case 0x09: // ADD HL,BC + case 0x19: // ADD HL,DE + case 0x29: // ADD HL,HL + data = R16( opcode, 4, 0x09 ); + add_hl_data: { + int sum = r.w.hl + data; + data ^= r.w.hl; + r.w.hl = sum; + flags = (flags & (S80 | Z40 | V04)) + + (sum >> 16) + + (sum >> 8 & (F20 | F08)) + + ((data ^ sum) >> 8 & H10); + goto loop; + } + + case 0x27:{// DAA + int a = r.b.a; + if ( a > 0x99 ) + flags |= C01; + + int adjust = 0x60 * (flags & C01); + + if ( flags & H10 || (a & 0x0F) > 9 ) + adjust += 0x06; + + if ( flags & N02 ) + adjust = -adjust; + a += adjust; + + flags = (flags & (C01 | N02)) + + ((r.b.a ^ a) & H10) + + SZ28P( BYTE( a ) ); + r.b.a = a; + goto loop; + } + +// INC/DEC + case 0x34: // INC (HL) + data = READ_MEM( r.w.hl ) + 1; + WRITE_MEM( r.w.hl, data ); + goto inc_set_flags; + + CASE7( 04, 0C, 14, 1C, 24, 2C, 3C ): // INC r + data = ++R8( opcode >> 3, 0 ); + inc_set_flags: + flags = (flags & C01) + + (((data & 0x0F) - 1) & H10) + + SZ28( BYTE( data ) ); + if ( data != 0x80 ) + goto loop; + flags += V04; + goto loop; + + case 0x35: // DEC (HL) + data = READ_MEM( r.w.hl ) - 1; + WRITE_MEM( r.w.hl, data ); + goto dec_set_flags; + + CASE7( 05, 0D, 15, 1D, 25, 2D, 3D ): // DEC r + data = --R8( opcode >> 3, 0 ); + dec_set_flags: + flags = (flags & C01) + N02 + + (((data & 0x0F) + 1) & H10) + + SZ28( BYTE( data ) ); + if ( data != 0x7F ) + goto loop; + flags += V04; + goto loop; + + case 0x03: // INC BC + case 0x13: // INC DE + case 0x23: // INC HL + R16( opcode, 4, 0x03 )++; + goto loop; + + case 0x33: // INC SP + sp = WORD( sp + 1 ); + goto loop; + + case 0x0B: // DEC BC + case 0x1B: // DEC DE + case 0x2B: // DEC HL + R16( opcode, 4, 0x0B )--; + goto loop; + + case 0x3B: // DEC SP + sp = WORD( sp - 1 ); + goto loop; + +// AND + case 0xA6: // AND (HL) + data = READ_MEM( r.w.hl ); + goto and_data; + + case 0xE6: // AND imm + pc++; + goto and_data; + + CASE7( A0, A1, A2, A3, A4, A5, A7 ): // AND r + data = R8( opcode, 0xA0 ); + and_data: + r.b.a &= data; + flags = SZ28P( r.b.a ) + H10; + goto loop; + +// OR + case 0xB6: // OR (HL) + data = READ_MEM( r.w.hl ); + goto or_data; + + case 0xF6: // OR imm + pc++; + goto or_data; + + CASE7( B0, B1, B2, B3, B4, B5, B7 ): // OR r + data = R8( opcode, 0xB0 ); + or_data: + r.b.a |= data; + flags = SZ28P( r.b.a ); + goto loop; + +// XOR + case 0xAE: // XOR (HL) + data = READ_MEM( r.w.hl ); + goto xor_data; + + case 0xEE: // XOR imm + pc++; + goto xor_data; + + CASE7( A8, A9, AA, AB, AC, AD, AF ): // XOR r + data = R8( opcode, 0xA8 ); + xor_data: + r.b.a ^= data; + flags = SZ28P( r.b.a ); + goto loop; + +// LD + CASE7( 70, 71, 72, 73, 74, 75, 77 ): // LD (HL),r + WRITE_MEM( r.w.hl, R8( opcode, 0x70 ) ); + goto loop; + + CASE6( 41, 42, 43, 44, 45, 47 ): // LD B,r + CASE6( 48, 4A, 4B, 4C, 4D, 4F ): // LD C,r + CASE6( 50, 51, 53, 54, 55, 57 ): // LD D,r + CASE6( 58, 59, 5A, 5C, 5D, 5F ): // LD E,r + CASE6( 60, 61, 62, 63, 65, 67 ): // LD H,r + CASE6( 68, 69, 6A, 6B, 6C, 6F ): // LD L,r + CASE6( 78, 79, 7A, 7B, 7C, 7D ): // LD A,r + R8( opcode >> 3 & 7, 0 ) = R8( opcode & 7, 0 ); + goto loop; + + CASE5( 06, 0E, 16, 1E, 26 ): // LD r,imm + R8( opcode >> 3, 0 ) = data; + pc++; + goto loop; + + case 0x36: // LD (HL),imm + pc++; + WRITE_MEM( r.w.hl, data ); + goto loop; + + CASE7( 46, 4E, 56, 5E, 66, 6E, 7E ): // LD r,(HL) + R8( opcode >> 3, 8 ) = READ_MEM( r.w.hl ); + goto loop; + + case 0x01: // LD r.w,imm + case 0x11: + case 0x21: + R16( opcode, 4, 0x01 ) = GET_ADDR(); + pc += 2; + goto loop; + + case 0x31: // LD sp,imm + sp = GET_ADDR(); + pc += 2; + goto loop; + + case 0x2A:{// LD HL,(addr) + int addr = GET_ADDR(); + pc += 2; + r.w.hl = READ_WORD( addr ); + goto loop; + } + + case 0x32:{// LD (addr),A + int addr = GET_ADDR(); + pc += 2; + WRITE_MEM( addr, r.b.a ); + goto loop; + } + + case 0x22:{// LD (addr),HL + int addr = GET_ADDR(); + pc += 2; + WRITE_WORD( addr, r.w.hl ); + goto loop; + } + + case 0x02: // LD (BC),A + case 0x12: // LD (DE),A + WRITE_MEM( R16( opcode, 4, 0x02 ), r.b.a ); + goto loop; + + case 0x0A: // LD A,(BC) + case 0x1A: // LD A,(DE) + r.b.a = READ_MEM( R16( opcode, 4, 0x0A ) ); + goto loop; + + case 0xF9: // LD SP,HL + sp = r.w.hl; + goto loop; + +// Rotate + + case 0x07:{// RLCA + int temp = r.b.a; + temp = (temp << 1) + (temp >> 7); + flags = (flags & (S80 | Z40 | P04)) + + (temp & (F20 | F08 | C01)); + r.b.a = temp; + goto loop; + } + + case 0x0F:{// RRCA + int temp = r.b.a; + flags = (flags & (S80 | Z40 | P04)) + + (temp & C01); + temp = (temp << 7) + (temp >> 1); + flags += temp & (F20 | F08); + r.b.a = temp; + goto loop; + } + + case 0x17:{// RLA + int temp = (r.b.a << 1) + (flags & C01); + flags = (flags & (S80 | Z40 | P04)) + + (temp & (F20 | F08)) + + (temp >> 8); + r.b.a = temp; + goto loop; + } + + case 0x1F:{// RRA + int temp = (flags << 7) + (r.b.a >> 1); + flags = (flags & (S80 | Z40 | P04)) + + (temp & (F20 | F08)) + + (r.b.a & C01); + r.b.a = temp; + goto loop; + } + +// Misc + case 0x2F:{// CPL + int temp = ~r.b.a; + flags = (flags & (S80 | Z40 | P04 | C01)) + + (temp & (F20 | F08)) + + (H10 | N02); + r.b.a = temp; + goto loop; + } + + case 0x3F:{// CCF + flags = ((flags & (S80 | Z40 | P04 | C01)) ^ C01) + + (flags << 4 & H10) + + (r.b.a & (F20 | F08)); + goto loop; + } + + case 0x37: // SCF + flags = ((flags & (S80 | Z40 | P04)) | C01) + + (r.b.a & (F20 | F08)); + goto loop; + + case 0xDB: // IN A,(imm) + pc++; + r.b.a = IN_PORT( (data + r.b.a * 0x100) ); + goto loop; + + case 0xE3:{// EX (SP),HL + int temp = READ_WORD( sp ); + WRITE_WORD( sp, r.w.hl ); + r.w.hl = temp; + goto loop; + } + + case 0xEB: // EX DE,HL + EX( r.w.hl, r.w.de ); + goto loop; + + case 0xD9: // EXX DE,HL + EXX( w.bc ); + EXX( w.de ); + EXX( w.hl ); + goto loop; + + case 0xF3: // DI + R.iff1 = 0; + R.iff2 = 0; + goto loop; + + case 0xFB: // EI + R.iff1 = 1; + R.iff2 = 1; + // TODO: delayed effect + goto loop; + + case 0x76: // HALT + goto halt; + +//////////////////////////////////////// CB prefix + { + case 0xCB: + pc++; + switch ( data ) + { + + // Rotate left + + #define RLC( read, write ) {\ + int result = read;\ + result = BYTE( result << 1 ) + (result >> 7);\ + flags = SZ28P( result ) + (result & C01);\ + write;\ + goto loop;\ + } + + case 0x06: // RLC (HL) + s_time += 7; + data = r.w.hl; + rlc_data_addr: + RLC( READ_MEM( data ), WRITE_MEM( data, result ) ) + + CASE7( 00, 01, 02, 03, 04, 05, 07 ):{// RLC r + byte* reg = &R8( data, 0 ); + RLC( *reg, *reg = result ) + } + + #define RL( read, write ) {\ + int result = (read << 1) + (flags & C01);\ + flags = SZ28PC( result );\ + write;\ + goto loop;\ + } + + case 0x16: // RL (HL) + s_time += 7; + data = r.w.hl; + rl_data_addr: + RL( READ_MEM( data ), WRITE_MEM( data, result ) ) + + CASE7( 10, 11, 12, 13, 14, 15, 17 ):{// RL r + byte* reg = &R8( data, 0x10 ); + RL( *reg, *reg = result ) + } + + #define SLA( read, low_bit, write ) {\ + int result = (read << 1) + low_bit;\ + flags = SZ28PC( result );\ + write;\ + goto loop;\ + } + + case 0x26: // SLA (HL) + s_time += 7; + data = r.w.hl; + sla_data_addr: + SLA( READ_MEM( data ), 0, WRITE_MEM( data, result ) ) + + CASE7( 20, 21, 22, 23, 24, 25, 27 ):{// SLA r + byte* reg = &R8( data, 0x20 ); + SLA( *reg, 0, *reg = result ) + } + + case 0x36: // SLL (HL) + s_time += 7; + data = r.w.hl; + sll_data_addr: + SLA( READ_MEM( data ), 1, WRITE_MEM( data, result ) ) + + CASE7( 30, 31, 32, 33, 34, 35, 37 ):{// SLL r + byte* reg = &R8( data, 0x30 ); + SLA( *reg, 1, *reg = result ) + } + + // Rotate right + + #define RRC( read, write ) {\ + int result = read;\ + flags = result & C01;\ + result = BYTE( result << 7 ) + (result >> 1);\ + flags += SZ28P( result );\ + write;\ + goto loop;\ + } + + case 0x0E: // RRC (HL) + s_time += 7; + data = r.w.hl; + rrc_data_addr: + RRC( READ_MEM( data ), WRITE_MEM( data, result ) ) + + CASE7( 08, 09, 0A, 0B, 0C, 0D, 0F ):{// RRC r + byte* reg = &R8( data, 0x08 ); + RRC( *reg, *reg = result ) + } + + #define RR( read, write ) {\ + int result = read;\ + int temp = result & C01;\ + result = BYTE( flags << 7 ) + (result >> 1);\ + flags = SZ28P( result ) + temp;\ + write;\ + goto loop;\ + } + + case 0x1E: // RR (HL) + s_time += 7; + data = r.w.hl; + rr_data_addr: + RR( READ_MEM( data ), WRITE_MEM( data, result ) ) + + CASE7( 18, 19, 1A, 1B, 1C, 1D, 1F ):{// RR r + byte* reg = &R8( data, 0x18 ); + RR( *reg, *reg = result ) + } + + #define SRA( read, write ) {\ + int result = read;\ + flags = result & C01;\ + result = (result & 0x80) + (result >> 1);\ + flags += SZ28P( result );\ + write;\ + goto loop;\ + } + + case 0x2E: // SRA (HL) + data = r.w.hl; + s_time += 7; + sra_data_addr: + SRA( READ_MEM( data ), WRITE_MEM( data, result ) ) + + CASE7( 28, 29, 2A, 2B, 2C, 2D, 2F ):{// SRA r + byte* reg = &R8( data, 0x28 ); + SRA( *reg, *reg = result ) + } + + #define SRL( read, write ) {\ + int result = read;\ + flags = result & C01;\ + result >>= 1;\ + flags += SZ28P( result );\ + write;\ + goto loop;\ + } + + case 0x3E: // SRL (HL) + s_time += 7; + data = r.w.hl; + srl_data_addr: + SRL( READ_MEM( data ), WRITE_MEM( data, result ) ) + + CASE7( 38, 39, 3A, 3B, 3C, 3D, 3F ):{// SRL r + byte* reg = &R8( data, 0x38 ); + SRL( *reg, *reg = result ) + } + + // BIT + { + int temp; + CASE8( 46, 4E, 56, 5E, 66, 6E, 76, 7E ): // BIT b,(HL) + s_time += 4; + temp = READ_MEM( r.w.hl ); + flags &= C01; + goto bit_temp; + CASE7( 40, 41, 42, 43, 44, 45, 47 ): // BIT 0,r + CASE7( 48, 49, 4A, 4B, 4C, 4D, 4F ): // BIT 1,r + CASE7( 50, 51, 52, 53, 54, 55, 57 ): // BIT 2,r + CASE7( 58, 59, 5A, 5B, 5C, 5D, 5F ): // BIT 3,r + CASE7( 60, 61, 62, 63, 64, 65, 67 ): // BIT 4,r + CASE7( 68, 69, 6A, 6B, 6C, 6D, 6F ): // BIT 5,r + CASE7( 70, 71, 72, 73, 74, 75, 77 ): // BIT 6,r + CASE7( 78, 79, 7A, 7B, 7C, 7D, 7F ): // BIT 7,r + temp = R8( data & 7, 0 ); + flags = (flags & C01) + (temp & (F20 | F08)); + bit_temp: + temp = temp & (1 << (data >> 3 & 7)); + flags += (temp & S80) + H10; + flags += (unsigned) --temp >> 8 & (Z40 | P04); + goto loop; + } + + // SET/RES + CASE8( 86, 8E, 96, 9E, A6, AE, B6, BE ): // RES b,(HL) + CASE8( C6, CE, D6, DE, E6, EE, F6, FE ):{// SET b,(HL) + s_time += 7; + int temp = READ_MEM( r.w.hl ); + int bit = 1 << (data >> 3 & 7); + temp |= bit; // SET + if ( !(data & 0x40) ) + temp ^= bit; // RES + WRITE_MEM( r.w.hl, temp ); + goto loop; + } + + CASE7( C0, C1, C2, C3, C4, C5, C7 ): // SET 0,r + CASE7( C8, C9, CA, CB, CC, CD, CF ): // SET 1,r + CASE7( D0, D1, D2, D3, D4, D5, D7 ): // SET 2,r + CASE7( D8, D9, DA, DB, DC, DD, DF ): // SET 3,r + CASE7( E0, E1, E2, E3, E4, E5, E7 ): // SET 4,r + CASE7( E8, E9, EA, EB, EC, ED, EF ): // SET 5,r + CASE7( F0, F1, F2, F3, F4, F5, F7 ): // SET 6,r + CASE7( F8, F9, FA, FB, FC, FD, FF ): // SET 7,r + R8( data & 7, 0 ) |= 1 << (data >> 3 & 7); + goto loop; + + CASE7( 80, 81, 82, 83, 84, 85, 87 ): // RES 0,r + CASE7( 88, 89, 8A, 8B, 8C, 8D, 8F ): // RES 1,r + CASE7( 90, 91, 92, 93, 94, 95, 97 ): // RES 2,r + CASE7( 98, 99, 9A, 9B, 9C, 9D, 9F ): // RES 3,r + CASE7( A0, A1, A2, A3, A4, A5, A7 ): // RES 4,r + CASE7( A8, A9, AA, AB, AC, AD, AF ): // RES 5,r + CASE7( B0, B1, B2, B3, B4, B5, B7 ): // RES 6,r + CASE7( B8, B9, BA, BB, BC, BD, BF ): // RES 7,r + R8( data & 7, 0 ) &= ~(1 << (data >> 3 & 7)); + goto loop; + } + assert( false ); + } + +#undef GET_ADDR +#define GET_ADDR() GET_LE16( &INSTR( 1, pc ) ) + +//////////////////////////////////////// ED prefix + { + case 0xED: + pc++; + s_time += (clock_table + 256) [data] >> 4; + switch ( data ) + { + { + int temp; + case 0x72: // SBC HL,SP + case 0x7A: // ADC HL,SP + temp = sp; + if ( 0 ) + case 0x42: // SBC HL,BC + case 0x52: // SBC HL,DE + case 0x62: // SBC HL,HL + case 0x4A: // ADC HL,BC + case 0x5A: // ADC HL,DE + case 0x6A: // ADC HL,HL + temp = R16( data >> 3 & 6, 1, 0 ); + int sum = temp + (flags & C01); + flags = ~data >> 2 & N02; + if ( flags ) + sum = -sum; + sum += r.w.hl; + temp ^= r.w.hl; + temp ^= sum; + flags +=(sum >> 16 & C01) + + (temp >> 8 & H10) + + (sum >> 8 & (S80 | F20 | F08)) + + ((temp + 0x8000) >> 14 & V04); + r.w.hl = sum; + if ( WORD( sum ) ) + goto loop; + flags += Z40; + goto loop; + } + + CASE8( 40, 48, 50, 58, 60, 68, 70, 78 ):{// IN r,(C) + int temp = IN_PORT( r.w.bc ); + R8( data >> 3, 8 ) = temp; + flags = (flags & C01) + SZ28P( temp ); + goto loop; + } + + case 0x71: // OUT (C),0 + r.b.flags = 0; + CASE7( 41, 49, 51, 59, 61, 69, 79 ): // OUT (C),r + OUT_PORT( r.w.bc, R8( data >> 3, 8 ) ); + goto loop; + + { + int temp; + case 0x73: // LD (ADDR),SP + temp = sp; + if ( 0 ) + case 0x43: // LD (ADDR),BC + case 0x53: // LD (ADDR),DE + temp = R16( data, 4, 0x43 ); + int addr = GET_ADDR(); + pc += 2; + WRITE_WORD( addr, temp ); + goto loop; + } + + case 0x4B: // LD BC,(ADDR) + case 0x5B:{// LD DE,(ADDR) + int addr = GET_ADDR(); + pc += 2; + R16( data, 4, 0x4B ) = READ_WORD( addr ); + goto loop; + } + + case 0x7B:{// LD SP,(ADDR) + int addr = GET_ADDR(); + pc += 2; + sp = READ_WORD( addr ); + goto loop; + } + + case 0x67:{// RRD + int temp = READ_MEM( r.w.hl ); + WRITE_MEM( r.w.hl, ((r.b.a << 4) + (temp >> 4)) ); + temp = (r.b.a & 0xF0) + (temp & 0x0F); + flags = (flags & C01) + SZ28P( temp ); + r.b.a = temp; + goto loop; + } + + case 0x6F:{// RLD + int temp = READ_MEM( r.w.hl ); + WRITE_MEM( r.w.hl, ((temp << 4) + (r.b.a & 0x0F)) ); + temp = (r.b.a & 0xF0) + (temp >> 4); + flags = (flags & C01) + SZ28P( temp ); + r.b.a = temp; + goto loop; + } + + CASE8( 44, 4C, 54, 5C, 64, 6C, 74, 7C ): // NEG + opcode = 0x10; // flag to do SBC instead of ADC + flags &= ~C01; + data = r.b.a; + r.b.a = 0; + goto adc_data; + + { + int inc; + case 0xA9: // CPD + case 0xB9: // CPDR + inc = -1; + if ( 0 ) + case 0xA1: // CPI + case 0xB1: // CPIR + inc = +1; + int addr = r.w.hl; + r.w.hl = addr + inc; + int temp = READ_MEM( addr ); + + int result = r.b.a - temp; + flags = (flags & C01) + N02 + + ((((temp ^ r.b.a) & H10) ^ result) & (S80 | H10)); + + if ( !BYTE( result ) ) + flags += Z40; + result -= (flags & H10) >> 4; + flags += result & F08; + flags += result << 4 & F20; + if ( !--r.w.bc ) + goto loop; + + flags += V04; + if ( flags & Z40 || data < 0xB0 ) + goto loop; + + pc -= 2; + s_time += 5; + goto loop; + } + + { + int inc; + case 0xA8: // LDD + case 0xB8: // LDDR + inc = -1; + if ( 0 ) + case 0xA0: // LDI + case 0xB0: // LDIR + inc = +1; + int addr = r.w.hl; + r.w.hl = addr + inc; + int temp = READ_MEM( addr ); + + addr = r.w.de; + r.w.de = addr + inc; + WRITE_MEM( addr, temp ); + + temp += r.b.a; + flags = (flags & (S80 | Z40 | C01)) + + (temp & F08) + (temp << 4 & F20); + if ( !--r.w.bc ) + goto loop; + + flags += V04; + if ( data < 0xB0 ) + goto loop; + + pc -= 2; + s_time += 5; + goto loop; + } + + { + int inc; + case 0xAB: // OUTD + case 0xBB: // OTDR + inc = -1; + if ( 0 ) + case 0xA3: // OUTI + case 0xB3: // OTIR + inc = +1; + int addr = r.w.hl; + r.w.hl = addr + inc; + int temp = READ_MEM( addr ); + + int b = --r.b.b; + flags = (temp >> 6 & N02) + SZ28( b ); + if ( b && data >= 0xB0 ) + { + pc -= 2; + s_time += 5; + } + + OUT_PORT( r.w.bc, temp ); + goto loop; + } + + { + int inc; + case 0xAA: // IND + case 0xBA: // INDR + inc = -1; + if ( 0 ) + case 0xA2: // INI + case 0xB2: // INIR + inc = +1; + + int addr = r.w.hl; + r.w.hl = addr + inc; + + int temp = IN_PORT( r.w.bc ); + + int b = --r.b.b; + flags = (temp >> 6 & N02) + SZ28( b ); + if ( b && data >= 0xB0 ) + { + pc -= 2; + s_time += 5; + } + + WRITE_MEM( addr, temp ); + goto loop; + } + + case 0x47: // LD I,A + R.i = r.b.a; + goto loop; + + case 0x4F: // LD R,A + SET_R( r.b.a ); + dprintf( "LD R,A not supported\n" ); + warning = true; + goto loop; + + case 0x57: // LD A,I + r.b.a = R.i; + goto ld_ai_common; + + case 0x5F: // LD A,R + r.b.a = GET_R(); + dprintf( "LD A,R not supported\n" ); + warning = true; + ld_ai_common: + flags = (flags & C01) + SZ28( r.b.a ) + (R.iff2 << 2 & V04); + goto loop; + + CASE8( 45, 4D, 55, 5D, 65, 6D, 75, 7D ): // RETI/RETN + R.iff1 = R.iff2; + goto ret_taken; + + case 0x46: case 0x4E: case 0x66: case 0x6E: // IM 0 + R.im = 0; + goto loop; + + case 0x56: case 0x76: // IM 1 + R.im = 1; + goto loop; + + case 0x5E: case 0x7E: // IM 2 + R.im = 2; + goto loop; + + default: + dprintf( "Opcode $ED $%02X not supported\n", data ); + warning = true; + goto loop; + } + assert( false ); + } + +//////////////////////////////////////// DD/FD prefix + { + int ixy; + case 0xDD: + ixy = ix; + goto ix_prefix; + case 0xFD: + ixy = iy; + ix_prefix: + pc++; + int data2 = READ_CODE( pc ); + s_time += (clock_table + 256) [data] & 0x0F; + switch ( data ) + { + // TODO: more efficient way of avoid negative address + // TODO: avoid using this as argument to READ_MEM() since it is evaluated twice + #define IXY_DISP( ixy, disp ) WORD( (ixy ) + (disp)) + + #define SET_IXY( in ) if ( opcode == 0xDD ) ix = in; else iy = in; + + // ADD/ADC/SUB/SBC + + case 0x96: // SUB (IXY+disp) + case 0x86: // ADD (IXY+disp) + flags &= ~C01; + case 0x9E: // SBC (IXY+disp) + case 0x8E: // ADC (IXY+disp) + pc++; + opcode = data; + data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) ); + goto adc_data; + + case 0x94: // SUB HXY + case 0x84: // ADD HXY + flags &= ~C01; + case 0x9C: // SBC HXY + case 0x8C: // ADC HXY + opcode = data; + data = ixy >> 8; + goto adc_data; + + case 0x95: // SUB LXY + case 0x85: // ADD LXY + flags &= ~C01; + case 0x9D: // SBC LXY + case 0x8D: // ADC LXY + opcode = data; + data = BYTE( ixy ); + goto adc_data; + + { + int temp; + case 0x39: // ADD IXY,SP + temp = sp; + goto add_ixy_data; + + case 0x29: // ADD IXY,HL + temp = ixy; + goto add_ixy_data; + + case 0x09: // ADD IXY,BC + case 0x19: // ADD IXY,DE + temp = R16( data, 4, 0x09 ); + add_ixy_data: { + int sum = ixy + temp; + temp ^= ixy; + ixy = WORD( sum ); + flags = (flags & (S80 | Z40 | V04)) + + (sum >> 16) + + (sum >> 8 & (F20 | F08)) + + ((temp ^ sum) >> 8 & H10); + goto set_ixy; + } + } + + // AND + case 0xA6: // AND (IXY+disp) + pc++; + data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) ); + goto and_data; + + case 0xA4: // AND HXY + data = ixy >> 8; + goto and_data; + + case 0xA5: // AND LXY + data = BYTE( ixy ); + goto and_data; + + // OR + case 0xB6: // OR (IXY+disp) + pc++; + data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) ); + goto or_data; + + case 0xB4: // OR HXY + data = ixy >> 8; + goto or_data; + + case 0xB5: // OR LXY + data = BYTE( ixy ); + goto or_data; + + // XOR + case 0xAE: // XOR (IXY+disp) + pc++; + data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) ); + goto xor_data; + + case 0xAC: // XOR HXY + data = ixy >> 8; + goto xor_data; + + case 0xAD: // XOR LXY + data = BYTE( ixy ); + goto xor_data; + + // CP + case 0xBE: // CP (IXY+disp) + pc++; + data = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) ); + goto cp_data; + + case 0xBC: // CP HXY + data = ixy >> 8; + goto cp_data; + + case 0xBD: // CP LXY + data = BYTE( ixy ); + goto cp_data; + + // LD + CASE7( 70, 71, 72, 73, 74, 75, 77 ): // LD (IXY+disp),r + data = R8( data, 0x70 ); + if ( 0 ) + case 0x36: // LD (IXY+disp),imm + pc++, data = READ_CODE( pc ); + pc++; + WRITE_MEM( IXY_DISP( ixy, SBYTE( data2 ) ), data ); + goto loop; + + CASE5( 44, 4C, 54, 5C, 7C ): // LD r,HXY + R8( data >> 3, 8 ) = ixy >> 8; + goto loop; + + case 0x64: // LD HXY,HXY + case 0x6D: // LD LXY,LXY + goto loop; + + CASE5( 45, 4D, 55, 5D, 7D ): // LD r,LXY + R8( data >> 3, 8 ) = ixy; + goto loop; + + CASE7( 46, 4E, 56, 5E, 66, 6E, 7E ): // LD r,(IXY+disp) + pc++; + R8( data >> 3, 8 ) = READ_MEM( IXY_DISP( ixy, SBYTE( data2 ) ) ); + goto loop; + + case 0x26: // LD HXY,imm + pc++; + goto ld_hxy_data; + + case 0x65: // LD HXY,LXY + data2 = BYTE( ixy ); + goto ld_hxy_data; + + CASE5( 60, 61, 62, 63, 67 ): // LD HXY,r + data2 = R8( data, 0x60 ); + ld_hxy_data: + ixy = BYTE( ixy ) + (data2 << 8); + goto set_ixy; + + case 0x2E: // LD LXY,imm + pc++; + goto ld_lxy_data; + + case 0x6C: // LD LXY,HXY + data2 = ixy >> 8; + goto ld_lxy_data; + + CASE5( 68, 69, 6A, 6B, 6F ): // LD LXY,r + data2 = R8( data, 0x68 ); + ld_lxy_data: + ixy = (ixy & 0xFF00) + data2; + set_ixy: + if ( opcode == 0xDD ) + { + ix = ixy; + goto loop; + } + iy = ixy; + goto loop; + + case 0xF9: // LD SP,IXY + sp = ixy; + goto loop; + + case 0x22:{// LD (ADDR),IXY + int addr = GET_ADDR(); + pc += 2; + WRITE_WORD( addr, ixy ); + goto loop; + } + + case 0x21: // LD IXY,imm + ixy = GET_ADDR(); + pc += 2; + goto set_ixy; + + case 0x2A:{// LD IXY,(addr) + int addr = GET_ADDR(); + ixy = READ_WORD( addr ); + pc += 2; + goto set_ixy; + } + + // DD/FD CB prefix + case 0xCB: { + data = IXY_DISP( ixy, SBYTE( data2 ) ); + pc++; + data2 = READ_CODE( pc ); + pc++; + switch ( data2 ) + { + case 0x06: goto rlc_data_addr; // RLC (IXY) + case 0x16: goto rl_data_addr; // RL (IXY) + case 0x26: goto sla_data_addr; // SLA (IXY) + case 0x36: goto sll_data_addr; // SLL (IXY) + case 0x0E: goto rrc_data_addr; // RRC (IXY) + case 0x1E: goto rr_data_addr; // RR (IXY) + case 0x2E: goto sra_data_addr; // SRA (IXY) + case 0x3E: goto srl_data_addr; // SRL (IXY) + + CASE8( 46, 4E, 56, 5E, 66, 6E, 76, 7E ):{// BIT b,(IXY+disp) + int temp = READ_MEM( data ); + temp = temp & (1 << (data2 >> 3 & 7)); + flags = (flags & C01) + H10 + (temp & S80); + flags += (unsigned) --temp >> 8 & (Z40 | P04); + goto loop; + } + + CASE8( 86, 8E, 96, 9E, A6, AE, B6, BE ): // RES b,(IXY+disp) + CASE8( C6, CE, D6, DE, E6, EE, F6, FE ):{// SET b,(IXY+disp) + int temp = READ_MEM( data ); + int bit = 1 << (data2 >> 3 & 7); + temp |= bit; // SET + if ( !(data2 & 0x40) ) + temp ^= bit; // RES + WRITE_MEM( data, temp ); + goto loop; + } + + default: + dprintf( "Opcode $%02X $CB $%02X not supported\n", opcode, data2 ); + warning = true; + goto loop; + } + assert( false ); + } + + // INC/DEC + case 0x23: // INC IXY + ixy = WORD( ixy + 1 ); + goto set_ixy; + + case 0x2B: // DEC IXY + ixy = WORD( ixy - 1 ); + goto set_ixy; + + case 0x34: // INC (IXY+disp) + ixy = IXY_DISP( ixy, SBYTE( data2 ) ); + pc++; + data = READ_MEM( ixy ) + 1; + WRITE_MEM( ixy, data ); + goto inc_set_flags; + + case 0x35: // DEC (IXY+disp) + ixy = IXY_DISP( ixy, SBYTE( data2 ) ); + pc++; + data = READ_MEM( ixy ) - 1; + WRITE_MEM( ixy, data ); + goto dec_set_flags; + + case 0x24: // INC HXY + ixy = WORD( ixy + 0x100 ); + data = ixy >> 8; + goto inc_xy_common; + + case 0x2C: // INC LXY + data = BYTE( ixy + 1 ); + ixy = (ixy & 0xFF00) + data; + inc_xy_common: + if ( opcode == 0xDD ) + { + ix = ixy; + goto inc_set_flags; + } + iy = ixy; + goto inc_set_flags; + + case 0x25: // DEC HXY + ixy = WORD( ixy - 0x100 ); + data = ixy >> 8; + goto dec_xy_common; + + case 0x2D: // DEC LXY + data = BYTE( ixy - 1 ); + ixy = (ixy & 0xFF00) + data; + dec_xy_common: + if ( opcode == 0xDD ) + { + ix = ixy; + goto dec_set_flags; + } + iy = ixy; + goto dec_set_flags; + + // PUSH/POP + case 0xE5: // PUSH IXY + data = ixy; + goto push_data; + + case 0xE1:{// POP IXY + ixy = READ_WORD( sp ); + sp = WORD( sp + 2 ); + goto set_ixy; + } + + // Misc + + case 0xE9: // JP (IXY) + pc = ixy; + goto loop; + + case 0xE3:{// EX (SP),IXY + int temp = READ_WORD( sp ); + WRITE_WORD( sp, ixy ); + ixy = temp; + goto set_ixy; + } + + default: + dprintf( "Unnecessary DD/FD prefix encountered\n" ); + warning = true; + pc--; + goto loop; + } + assert( false ); + } + + } + dprintf( "Unhandled main opcode: $%02X\n", opcode ); + assert( false ); + +#ifdef IDLE_ADDR +hit_idle_addr: + s_time -= 11; + goto out_of_time; +#endif +halt: + s_time &= 3; // increment by multiple of 4 +out_of_time: + pc--; + + r.b.flags = flags; + R.ix = ix; + R.iy = iy; + R.sp = sp; + R.pc = pc; + R.b = r.b; + + cpu->cpu_state_.base = s.base; + cpu->cpu_state_.time = s_time; + cpu->cpu_state = &cpu->cpu_state_; +} diff --git a/apps/lang/arabic.lang b/apps/lang/arabic.lang index 12e84c8..b9450c1 100644 --- a/apps/lang/arabic.lang +++ b/apps/lang/arabic.lang @@ -7010,17 +7010,17 @@ radio: "قائمة اذاعة ا٠ام" </voice> </phrase> -<phrase>
- id: LANG_FILESIZE
- desc: in record timesplit options and in track information viewer
- user: core
- <source>
- *: "Filesize"
- </source>
- <dest>
- *: "ØØ¬Ù… الملÙ"
- </dest>
- <voice>
- *: "ØØ¬Ù… الملÙ"
- </voice>
+<phrase> + id: LANG_FILESIZE + desc: in record timesplit options and in track information viewer + user: core + <source> + *: "Filesize" + </source> + <dest> + *: "ØØ¬Ù… الملÙ" + </dest> + <voice> + *: "ØØ¬Ù… الملÙ" + </voice> </phrase> diff --git a/apps/lang/latviesu.lang b/apps/lang/latviesu.lang index 0fb0afa..866820d 100644 --- a/apps/lang/latviesu.lang +++ b/apps/lang/latviesu.lang @@ -1,12750 +1,12750 @@ -# __________ __ ___.
-# Open \______ \ ____ ____ | | _\_ |__ _______ ___
-# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
-# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
-# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
-# \/ \/ \/ \/ \/
-# $Id$
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-# KIND, either express or implied.
-#
-#
-# Latvian language file, translated by MÄrtiņš Å imis jeb msh
-
-<phrase>
- id: LANG_SET_BOOL_YES
- desc: bool true representation
- user: core
- <source>
- *: "Yes"
- </source>
- <dest>
- *: "JÄ"
- </dest>
- <voice>
- *: "jaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SET_BOOL_NO
- desc: bool false representation
- user: core
- <source>
- *: "No"
- </source>
- <dest>
- *: "NÄ“"
- </dest>
- <voice>
- *: "nee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ON
- desc: Used in a lot of places
- user: core
- <source>
- *: "On"
- </source>
- <dest>
- *: "Ieslēgts"
- </dest>
- <voice>
- *: "iesleegts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_OFF
- desc: Used in a lot of places
- user: core
- <source>
- *: "Off"
- </source>
- <dest>
- *: "Izslēgts"
- </dest>
- <voice>
- *: "izsleegts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ASK
- desc: in settings_menu
- user: core
- <source>
- *: "Ask"
- </source>
- <dest>
- *: "Prasīt"
- </dest>
- <voice>
- *: "prasiit"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALWAYS
- desc: used in various places
- user: core
- <source>
- *: "Always"
- </source>
- <dest>
- *: "Vienmēr"
- </dest>
- <voice>
- *: "vienmeer"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NORMAL
- desc: in settings_menu
- user: core
- <source>
- *: "Normal"
- </source>
- <dest>
- *: "NormÄls"
- </dest>
- <voice>
- *: "normaals"
- </voice>
-</phrase>
-<phrase>
- id: LANG_GAIN
- desc: Generic string for gain used in EQ menu and recording screen
- user: core
- <source>
- *: "Gain"
- </source>
- <dest>
- *: "PastiprinÄjums"
- </dest>
- <voice>
- *: "pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WAIT
- desc: general please wait splash
- user: core
- <source>
- *: "Loading..."
- </source>
- <dest>
- *: "IelÄdÄ“..."
- </dest>
- <voice>
- *: "notiek ielaade"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LOADING_PERCENT
- desc: splash number of percents loaded
- user: core
- <source>
- *: "Loading... %d%% done (%s)"
- </source>
- <dest>
- *: "ielaade... %d%% gatavs (%s)"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCANNING_DISK
- desc: when booting up and rebuilding the cache and calculating free space
- user: core
- <source>
- *: "Scanning disk..."
- </source>
- <dest>
- *: "Skanē atmiņu..."
- </dest>
- <voice>
- *: "skanee atminju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHUTTINGDOWN
- desc: in main menu
- user: core
- <source>
- *: "Shutting down..."
- </source>
- <dest>
- *: "Izslēdzas..."
- </dest>
- <voice>
- *: "izsleedzas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CANCEL
- desc: Visual confirmation of canceling a changed setting
- user: core
- <source>
- *: "Cancelled"
- </source>
- <dest>
- *: "Atcelts"
- </dest>
- <voice>
- *: "atcelts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FAILED
- desc: Something failed. To be appended after actions
- user: core
- <source>
- *: "Failed"
- </source>
- <dest>
- *: "NeizdevÄs"
- </dest>
- <voice>
- *: "neizdevaas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNELS
- desc: in sound_settings
- user: core
- <source>
- *: "Channels"
- </source>
- <dest>
- *: "KanÄli"
- </dest>
- <voice>
- *: "kanaali"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET_ASK
- desc: confirm to reset settings
- user: core
- <source>
- *: "Are You Sure?"
- </source>
- <dest>
- *: "Vai esi pÄrliecinÄts?"
- </dest>
- <voice>
- *: "vai esi paarliecinaats"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CONFIRM_WITH_BUTTON
- desc: Generic string to use to confirm
- user: core
- <source>
- *: "PLAY = Yes"
- cowond2*: "MENU, or top-right = Yes"
- iriverh100,iriverh120,iriverh300: "NAVI = Yes"
- samsungyh*,ipod*,iaudiox5,iaudiom5,gigabeat*,sansae200*,sansac200*,iriverh10,iriverh10_5gb,mrobe100,sansaclip*,sansafuze*: "SELECT = Yes"
- mrobe500: "PLAY, POWER, or top-right = Yes"
- archosplayer: "(PLAY/STOP)"
- vibe500: "OK = Yes"
- </source>
- <dest>
- *: "PLAY = JÄ"
- cowond2*: "MENU, vai labÄ augšējÄ = JÄ"
- iriverh100,iriverh120,iriverh300: "NAVI = JÄ"
- samsungyh*,ipod*,iaudiox5,iaudiom5,gigabeat*,sansae200*,sansac200*,iriverh10,iriverh10_5gb,mrobe100,sansaclip*,sansafuze*: "SELECT = JÄ"
- mrobe500: "PLAY, POWER, vai labÄ augšējÄ = JÄ"
- archosplayer: "(PLAY/STOP)"
- vibe500: "OK = JÄ"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_CANCEL_WITH_ANY
- desc: Generic string to use to cancel
- user: core
- <source>
- *: "Any Other = No"
- archosplayer: none
- </source>
- <dest>
- *: "Jebkas cits = NÄ“"
- archosplayer: none
- </dest>
- <voice>
- *: ""
- archosplayer: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_ROCKBOX_TITLE
- desc: main menu title
- user: core
- <source>
- *: "Rockbox"
- </source>
- <dest>
- *: "Rockbox"
- </dest>
- <voice>
- *: "Rockbox"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_MENU_RECENT_BOOKMARKS
- desc: in the main menu
- user: core
- <source>
- *: "Recent Bookmarks"
- </source>
- <dest>
- *: "NesenÄs GrÄmatzÄ«mes"
- </dest>
- <voice>
- *: "nesenaas graamatziimes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DIR_BROWSER
- desc: main menu title
- user: core
- <source>
- *: "Files"
- </source>
- <dest>
- *: "Faili"
- </dest>
- <voice>
- *: "faili"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE
- desc: in the main menu and the settings menu
- user: core
- <source>
- *: "Database"
- </source>
- <dest>
- *: "DatubÄze"
- </dest>
- <voice>
- *: "datubaaze"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NOW_PLAYING
- desc: in the main menu
- user: core
- <source>
- *: "Now Playing"
- </source>
- <dest>
- *: "Šobrīd Atskaņo"
- </dest>
- <voice>
- *: "shobriid atskanjo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESUME_PLAYBACK
- desc: in the main menu
- user: core
- <source>
- *: "Resume Playback"
- </source>
- <dest>
- *: "TurpinÄt AtskaņoÅ¡anu"
- </dest>
- <voice>
- *: "turpinaat atskanjoshanu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SETTINGS
- desc: in main menu and visual confirmation after settings reset
- user: core
- <source>
- *: "Settings"
- </source>
- <dest>
- *: "UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING
- desc: in the main menu
- user: core
- <source>
- *: none
- recording: "Recording"
- </source>
- <dest>
- *: none
- recording: "Ierakstīšana"
- </dest>
- <voice>
- *: none
- recording: "ierakstiishana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_RADIO
- desc: in the main menu
- user: core
- <source>
- *: none
- radio: "FM Radio"
- </source>
- <dest>
- *: none
- radio: "FM Radio"
- </dest>
- <voice>
- *: none
- radio: "fm radio"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLISTS
- desc: in the file view setting
- user: core
- <source>
- *: "Playlists"
- </source>
- <dest>
- *: "Izlases"
- </dest>
- <voice>
- *: "izlases"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGINS
- desc: in the main menu
- user: core
- <source>
- *: "Plugins"
- </source>
- <dest>
- *: "Spraudņi"
- </dest>
- <voice>
- *: "spraudnji"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSTEM
- desc: in the main menu and settings menu
- user: core
- <source>
- *: "System"
- </source>
- <dest>
- *: "Sistēma"
- </dest>
- <voice>
- *: "sisteema"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SELECT_BOOKMARK
- desc: bookmark selection list title
- user: core
- <source>
- *: "Select Bookmark"
- </source>
- <dest>
- *: "IzvÄ“lÄ“ties GrÄmatzÄ«mi"
- </dest>
- <voice>
- *: "izveeleeties graamatziimi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_DONT_RESUME
- desc: top item in the list when asking user about bookmark auto load
- user: core
- <source>
- *: "<Don't Resume>"
- </source>
- <dest>
- *: "<NeatsÄkt>"
- </dest>
- <voice>
- *: "neatsaakt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SHUFFLE
- desc: bookmark selection list, bookmark enables shuffle
- user: core
- <source>
- *: ", Shuffle"
- </source>
- <dest>
- *: ", PÄrmaiņus"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_INVALID
- desc: bookmark selection list, bookmark couldn't be parsed
- user: core
- <source>
- *: "<Invalid Bookmark>"
- </source>
- <dest>
- *: "<NederÄ«ga GrÄmatzÄ«me>"
- </dest>
- <voice>
- *: "nederiiga graamatziime"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_CONTEXT_MENU
- desc: bookmark selection list context menu
- user: core
- <source>
- *: "Bookmark Actions"
- </source>
- <dest>
- *: "GrÄmatzÄ«mju DarbÄ«bas"
- </dest>
- <voice>
- *: "graamatziimju darbiibas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_CONTEXT_RESUME
- desc: bookmark context menu, resume this bookmark
- user: core
- <source>
- *: "Resume"
- </source>
- <dest>
- *: "AtsÄkt"
- </dest>
- <voice>
- *: "atsaakt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_CONTEXT_DELETE
- desc: bookmark context menu, delete this bookmark
- user: core
- <source>
- *: "Delete"
- </source>
- <dest>
- *: "Izdzēst"
- </dest>
- <voice>
- *: "izdzeest"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTO_BOOKMARK_QUERY
- desc: prompt for user to decide to create an bookmark
- user: core
- <source>
- *: "Create a Bookmark?"
- </source>
- <dest>
- *: "Izveidot GrÄmatzÄ«mi?"
- </dest>
- <voice>
- *: "vai izveidot graamatziimi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_CREATE_SUCCESS
- desc: Indicates bookmark was successfully created
- user: core
- <source>
- *: "Bookmark Created"
- </source>
- <dest>
- *: "GrÄmatzÄ«me Izveidota"
- </dest>
- <voice>
- *: "graamatziime izveidota"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_CREATE_FAILURE
- desc: Indicates bookmark was not created
- user: core
- <source>
- *: "Bookmark Failed!"
- </source>
- <dest>
- *: "NeizdevÄs Izveidot!"
- </dest>
- <voice>
- *: "neizdevaas izveidot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_LOAD_EMPTY
- desc: Indicates bookmark was empty
- user: core
- <source>
- *: "Bookmark Empty"
- </source>
- <dest>
- *: "TukÅ¡a GrÄmatzÄ«me"
- </dest>
- <voice>
- *: "tuksha graamatziime"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SOUND_SETTINGS
- desc: in the main menu
- user: core
- <source>
- *: "Sound Settings"
- </source>
- <dest>
- *: "Skaņas UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "skanjas uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOLUME
- desc: in sound_settings
- user: core
- <source>
- *: "Volume"
- </source>
- <dest>
- *: "Skaļums"
- </dest>
- <voice>
- *: "skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BASS
- desc: in sound_settings
- user: core
- <source>
- *: "Bass"
- </source>
- <dest>
- *: "Basi"
- </dest>
- <voice>
- *: "basi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TREBLE
- desc: in sound_settings
- user: core
- <source>
- *: "Treble"
- </source>
- <dest>
- *: "Augšas"
- </dest>
- <voice>
- *: "augshas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BALANCE
- desc: in sound_settings
- user: core
- <source>
- *: "Balance"
- </source>
- <dest>
- *: "Balanss"
- </dest>
- <voice>
- *: "balanss"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_CONFIGURATION
- desc: in sound_settings
- user: core
- <source>
- *: "Channel Configuration"
- </source>
- <dest>
- *: "KanÄlu KonfigurÄcija"
- </dest>
- <voice>
- *: "kanaalu konfiguraacija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_STEREO
- desc: in sound_settings
- user: core
- <source>
- *: "Stereo"
- </source>
- <dest>
- *: "Stereo"
- </dest>
- <voice>
- *: "stereo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_MONO
- desc: in sound_settings
- user: core
- <source>
- *: "Mono"
- </source>
- <dest>
- *: "Mono"
- </dest>
- <voice>
- *: "mono"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_CUSTOM
- desc: in sound_settings
- user: core
- <source>
- *: "Custom"
- </source>
- <dest>
- *: "Nestandarta"
- </dest>
- <voice>
- *: "nestandarta"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_LEFT
- desc: in sound_settings
- user: core
- <source>
- *: "Mono Left"
- </source>
- <dest>
- *: "Mono Kreisais"
- </dest>
- <voice>
- *: "mono kreisais"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_RIGHT
- desc: in sound_settings
- user: core
- <source>
- *: "Mono Right"
- </source>
- <dest>
- *: "Mono Labais"
- </dest>
- <voice>
- *: "mono labais"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_LEFTRIGHT
- desc: in sound_settings
- user: core
- <source>
- *: none
- recording_swcodec: "Mono Left + Right"
- </source>
- <dest>
- *: none
- recording_swcodec: "Kreisais + Labais"
- </dest>
- <voice>
- *: none
- recording_swcodec: "mono kreisais plus labais"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CHANNEL_KARAOKE
- desc: in sound_settings
- user: core
- <source>
- *: "Karaoke"
- </source>
- <dest>
- *: "Karaoke"
- </dest>
- <voice>
- *: "karaoke"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STEREO_WIDTH
- desc: in sound_settings
- user: core
- <source>
- *: "Stereo Width"
- </source>
- <dest>
- *: "Stereo Platums"
- </dest>
- <voice>
- *: "stereo platums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFEED
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Crossfeed"
- </source>
- <dest>
- *: none
- swcodec: "KanÄlu IzlÄ«dzinÄÅ¡ana"
- </dest>
- <voice>
- *: none
- swcodec: "kanaalu izliidzinaashana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFEED_DIRECT_GAIN
- desc: in crossfeed settings
- user: core
- <source>
- *: none
- swcodec: "Direct Gain"
- </source>
- <dest>
- *: none
- swcodec: "Tiešais Skaļums"
- </dest>
- <voice>
- *: none
- swcodec: "tieshais skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFEED_CROSS_GAIN
- desc: in crossfeed settings
- user: core
- <source>
- *: none
- swcodec: "Cross Gain"
- </source>
- <dest>
- *: none
- swcodec: "Starpskaļums"
- </dest>
- <voice>
- *: none
- swcodec: "starpskaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFEED_HF_ATTENUATION
- desc: in crossfeed settings
- user: core
- <source>
- *: none
- swcodec: "High-Frequency Attenuation"
- </source>
- <dest>
- *: none
- swcodec: "Augsto FrekvenÄu VÄjinÄjums"
- </dest>
- <voice>
- *: none
- swcodec: "augsto frekvenchu vaajinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFEED_HF_CUTOFF
- desc: in crossfeed settings
- user: core
- <source>
- *: none
- swcodec: "High-Frequency Cutoff"
- </source>
- <dest>
- *: none
- swcodec: "Augsto FrekvenÄu SÄkums"
- </dest>
- <voice>
- *: none
- swcodec: "augsto frekvenchu saakums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER
- desc: in the sound settings menu
- user: core
- <source>
- *: none
- swcodec: "Equalizer"
- </source>
- <dest>
- *: none
- swcodec: "Ekvalaizers"
- </dest>
- <voice>
- *: none
- swcodec: "ekvalaizers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_ENABLED
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Enable EQ"
- </source>
- <dest>
- *: none
- swcodec: "Ieslēgt Ekvalaizeru"
- </dest>
- <voice>
- *: none
- swcodec: "ieslēgt ekvalaizeru"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_GRAPHICAL
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Graphical EQ"
- </source>
- <dest>
- *: none
- swcodec: "Grafiskais Ekvalaizers"
- </dest>
- <voice>
- *: none
- swcodec: "grafiskais ekvalaizers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_PRECUT
- desc: in eq settings
- user: core
- <source>
- *: none
- swcodec: "Precut"
- </source>
- <dest>
- *: none
- swcodec: "PastiprinÄjums"
- </dest>
- <voice>
- *: none
- swcodec: "kopeejais frekvenchu pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_GAIN
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Simple EQ Settings"
- </source>
- <dest>
- *: none
- swcodec: "VienkÄrÅ¡otais Ekvalaizers"
- </dest>
- <voice>
- *: none
- swcodec: "vienkaarshotais ekvalaizers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_ADVANCED
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Advanced EQ Settings"
- </source>
- <dest>
- *: none
- swcodec: "Papildus UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: none
- swcodec: "papildus uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_SAVE
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Save EQ Preset"
- </source>
- <dest>
- *: none
- swcodec: "SaglabÄt UzstÄdÄ«jumus"
- </dest>
- <voice>
- *: none
- swcodec: "saglabaat ekvalaizera uzstaadiijumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BROWSE
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Browse EQ Presets"
- </source>
- <dest>
- *: none
- swcodec: "AplÅ«kot UzstÄdÄ«jumus"
- </dest>
- <voice>
- *: none
- swcodec: "apluukot ekvalaizera uzstaadiijumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_EDIT_MODE
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Edit mode: %s"
- </source>
- <dest>
- *: none
- swcodec: "Režīms: %s"
- </dest>
- <voice>
- *: none
- swcodec: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_GAIN_ITEM
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "%d Hz Band Gain"
- </source>
- <dest>
- *: none
- swcodec: "%d Hz Joslas Stiprums"
- </dest>
- <voice>
- *: none
- swcodec: "joslas stiprums hercos"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BAND_LOW_SHELF
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Low Shelf Filter"
- </source>
- <dest>
- *: none
- swcodec: "Basu Filtrs"
- </dest>
- <voice>
- *: none
- swcodec: "basu filtrs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BAND_PEAK
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Peak Filter %d"
- </source>
- <dest>
- *: none
- swcodec: "Pīķa Filtrs %d"
- </dest>
- <voice>
- *: none
- swcodec: "piikja filtrs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BAND_HIGH_SHELF
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "High Shelf Filter"
- </source>
- <dest>
- *: none
- swcodec: "Augsto FrekvenÄu Filtrs"
- </dest>
- <voice>
- *: none
- swcodec: "augsto frekvenchu filtrs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BAND_CUTOFF
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Cutoff Frequency"
- </source>
- <dest>
- *: none
- swcodec: "Robežfrekvence"
- </dest>
- <voice>
- *: none
- swcodec: "robezhfrekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BAND_CENTER
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Centre Frequency"
- </source>
- <dest>
- *: none
- swcodec: "Centra Frekvence"
- </dest>
- <voice>
- *: none
- swcodec: "centra frekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EQUALIZER_BAND_Q
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Q"
- </source>
- <dest>
- *: none
- swcodec: "Platums"
- </dest>
- <voice>
- *: none
- swcodec: "platums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DITHERING
- desc: in the sound settings menu
- user: core
- <source>
- *: none
- swcodec: "Dithering"
- </source>
- <dest>
- *: none
- swcodec: "Skaņas IzlÄ«dzinÄÅ¡ana"
- </dest>
- <voice>
- *: none
- swcodec: "skanjas izliidzinaashana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LOUDNESS
- desc: in sound_settings
- user: core
- <source>
- *: none
- masf: "Loudness"
- </source>
- <dest>
- *: none
- masf: "Skaļums"
- </dest>
- <voice>
- *: none
- masf: "skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTOVOL
- desc: in sound_settings
- user: core
- <source>
- *: none
- masf: "Auto Volume"
- </source>
- <dest>
- *: none
- masf: "Auto Skaļums"
- </dest>
- <voice>
- *: none
- masf: "auto skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DECAY
- desc: in sound_settings
- user: core
- <source>
- *: none
- masf: "AV Decay Time"
- </source>
- <dest>
- *: none
- masf: "AS Regulēšanas Laiks"
- </dest>
- <voice>
- *: none
- masf: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SUPERBASS
- desc: in sound settings
- user: core
- <source>
- *: none
- masf: "Super Bass"
- </source>
- <dest>
- *: none
- masf: "Basu PastiprinÄjums"
- </dest>
- <voice>
- *: none
- masf: "basu pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MDB_ENABLE
- desc: in sound settings
- user: core
- <source>
- *: none
- masf: "MDB Enable"
- </source>
- <dest>
- *: none
- masf: "IeslÄ“gt MÄkslÄ«gos Basus"
- </dest>
- <voice>
- *: none
- masf: "iesleegt maaksliigos basus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MDB_STRENGTH
- desc: in sound settings
- user: core
- <source>
- *: none
- masf: "MDB Strength"
- </source>
- <dest>
- *: none
- masf: "MB Stiprums"
- </dest>
- <voice>
- *: none
- masf: "maaksliigo basu stiprums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MDB_HARMONICS
- desc: in sound settings
- user: core
- <source>
- *: none
- masf: "MDB Harmonics"
- </source>
- <dest>
- *: none
- masf: "MB Konvertēšana"
- </dest>
- <voice>
- *: none
- masf: "maaksliigo basu konverteeshana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MDB_CENTER
- desc: in sound settings
- user: core
- <source>
- *: none
- masf: "MDB Centre Frequency"
- </source>
- <dest>
- *: none
- masf: "MB Centra Frekvence"
- </dest>
- <voice>
- *: none
- masf: "maaksliigo basu centra frekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MDB_SHAPE
- desc: in sound settings
- user: core
- <source>
- *: none
- masf: "MDB Shape"
- </source>
- <dest>
- *: none
- masf: "MB Forma"
- </dest>
- <voice>
- *: none
- masf: "maaksliigo basu forma"
- </voice>
-</phrase>
-<phrase>
- id: LANG_GENERAL_SETTINGS
- desc: in the main menu
- user: core
- <source>
- *: "General Settings"
- </source>
- <dest>
- *: "VispÄrÄ“ji UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "vispaareeji uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYBACK
- desc: in settings_menu()
- user: core
- <source>
- *: "Playback Settings"
- </source>
- <dest>
- *: "AtskaņoÅ¡anas UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "atskanjoshanas Uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHUFFLE
- desc: in settings_menu
- user: core
- <source>
- *: "Shuffle"
- </source>
- <dest>
- *: "Jaukta Secība"
- </dest>
- <voice>
- *: "jaukta seciiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPEAT
- desc: in settings_menu
- user: core
- <source>
- *: "Repeat"
- </source>
- <dest>
- *: "AtkÄrtot"
- </dest>
- <voice>
- *: "atkaartot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALL
- desc: generic string used both in dir file filter and repeat mode selection
- user: core
- <source>
- *: "All"
- </source>
- <dest>
- *: "Visus"
- </dest>
- <voice>
- *: "visus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPEAT_ONE
- desc: repeat one song
- user: core
- <source>
- *: "One"
- </source>
- <dest>
- *: "Vienu"
- </dest>
- <voice>
- *: "vienu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPEAT_AB
- desc: repeat range from point A to B
- user: core
- <source>
- *: "A-B"
- </source>
- <dest>
- *: "A-B"
- </dest>
- <voice>
- *: "aa-bee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAY_SELECTED
- desc: in settings_menu
- user: core
- <source>
- *: "Play Selected First"
- </source>
- <dest>
- *: "Izvēlēto Atskaņot Pirmo"
- </dest>
- <voice>
- *: "izveeleeto failu atskanjot pirmo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WIND_MENU
- desc: in the playback sub menu
- user: core
- <source>
- *: "Fast-Forward/Rewind"
- </source>
- <dest>
- *: "PÄrtīšana/Attīšana"
- </dest>
- <voice>
- *: "aatraa paartiishana un attiishana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FFRW_STEP
- desc: in settings_menu
- user: core
- <source>
- *: "FF/RW Min Step"
- </source>
- <dest>
- *: "PT/ATT Min Solis"
- </dest>
- <voice>
- *: "minimaalais solis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FFRW_ACCEL
- desc: in settings_menu
- user: core
- <source>
- *: "FF/RW Accel"
- </source>
- <dest>
- *: "PT/ATT PaÄtrin"
- </dest>
- <voice>
- *: "Paaatrinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MP3BUFFER_MARGIN
- desc: MP3 buffer margin time
- user: core
- <source>
- *: "Anti-Skip Buffer"
- flash_storage: none
- </source>
- <dest>
- *: "PretraustīšanÄs Buferis"
- flash_storage: none
- </dest>
- <voice>
- *: "pretraustiishanaas buferis"
- flash_storage: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_FADE_ON_STOP
- desc: options menu to set fade on stop or pause
- user: core
- <source>
- *: "Fade on Stop/Pause"
- </source>
- <dest>
- *: "Izdzišana pie Stop/Pauzes"
- </dest>
- <voice>
- *: "izdzishana pie stop vai pauzes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PARTY_MODE
- desc: party mode
- user: core
- <source>
- *: "Party Mode"
- </source>
- <dest>
- *: "Ballītes Režīms"
- </dest>
- <voice>
- *: "balliites rezhiims"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE
- desc: in playback settings
- user: core
- <source>
- *: none
- crossfade: "Crossfade"
- </source>
- <dest>
- *: none
- crossfade: "PÄrklÄÅ¡anÄs"
- </dest>
- <voice>
- *: none
- crossfade: "paarklaashanaas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE_ENABLE
- desc: in crossfade settings menu
- user: core
- <source>
- *: none
- crossfade: "Enable Crossfade"
- </source>
- <dest>
- *: none
- crossfade: "Izmantot PÄrklÄÅ¡anos"
- </dest>
- <voice>
- *: none
- crossfade: "izmantot paarklaashanos"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MANTRACKSKIP
- desc: in crossfade settings
- user: core
- <source>
- *: none
- crossfade: "Manual Track Skip Only"
- </source>
- <dest>
- *: none
- crossfade: "Tikai PÄrslÄ“dzot"
- </dest>
- <voice>
- *: none
- crossfade: "tikai paarsleedzot dziesmas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHUFFLE_TRACKSKIP
- desc: in settings_menu
- user: core
- <source>
- *: none
- crossfade: "Shuffle or Manual Track Skip"
- </source>
- <dest>
- *: none
- crossfade: "Jaukta SecÄ«ba Vai PÄrslÄ“dzoties"
- </dest>
- <voice>
- *: none
- crossfade: "atskanjojot jauktaa seciibaa vai paarsleedzoties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE_FADE_IN_DELAY
- desc: in crossfade settings menu
- user: core
- <source>
- *: none
- crossfade: "Fade-In Delay"
- </source>
- <dest>
- *: none
- crossfade: "Ievada Aizture"
- </dest>
- <voice>
- *: none
- crossfade: "ievada aizture"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE_FADE_IN_DURATION
- desc: in crossfade settings menu
- user: core
- <source>
- *: none
- crossfade: "Fade-In Duration"
- </source>
- <dest>
- *: none
- crossfade: "Ievada Garums"
- </dest>
- <voice>
- *: none
- crossfade: "ievada garums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE_FADE_OUT_DELAY
- desc: in crossfade settings menu
- user: core
- <source>
- *: none
- crossfade: "Fade-Out Delay"
- </source>
- <dest>
- *: none
- crossfade: "Beigu Aizture"
- </dest>
- <voice>
- *: none
- crossfade: "beigu aizture"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE_FADE_OUT_DURATION
- desc: in crossfade settings menu
- user: core
- <source>
- *: none
- crossfade: "Fade-Out Duration"
- </source>
- <dest>
- *: none
- crossfade: "Beigu Garums"
- </dest>
- <voice>
- *: none
- crossfade: "beigu garums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CROSSFADE_FADE_OUT_MODE
- desc: in crossfade settings menu
- user: core
- <source>
- *: none
- crossfade: "Fade-Out Mode"
- </source>
- <dest>
- *: none
- crossfade: "Beigu Režīms"
- </dest>
- <voice>
- *: none
- crossfade: "beigu rezhiims"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MIX
- desc: in playback settings, crossfade option
- user: core
- <source>
- *: none
- crossfade: "Mix"
- </source>
- <dest>
- *: none
- crossfade: "SajaukÅ¡anÄs"
- </dest>
- <voice>
- *: none
- crossfade: "sajaukshanaas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPLAYGAIN
- desc: in replaygain
- user: core
- <source>
- *: "Replaygain"
- </source>
- <dest>
- *: "Skaļuma NormalizÄcija"
- </dest>
- <voice>
- *: "skaljuma normalizaacija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPLAYGAIN_NOCLIP
- desc: in replaygain
- user: core
- <source>
- *: none
- swcodec: "Prevent Clipping"
- </source>
- <dest>
- *: none
- swcodec: "NovÄ“rst PÄrlieku Skaļumu"
- </dest>
- <voice>
- *: none
- swcodec: "noveerst paarlieku skaljumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPLAYGAIN_MODE
- desc: in replaygain
- user: core
- <source>
- *: "Replaygain Type"
- </source>
- <dest>
- *: "NormalizÄcijas Veids"
- </dest>
- <voice>
- *: "normalizaacijas veids"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALBUM_GAIN
- desc: in replaygain
- user: core
- <source>
- *: "Album Gain"
- </source>
- <dest>
- *: "Albūmu Skaļums"
- </dest>
- <voice>
- *: "albuumu skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TRACK_GAIN
- desc: in replaygain
- user: core
- <source>
- *: "Track Gain"
- </source>
- <dest>
- *: "Dziesmu Skaļums"
- </dest>
- <voice>
- *: "dziesmu skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHUFFLE_GAIN
- desc: use track gain if shuffle mode is on, album gain otherwise
- user: core
- <source>
- *: "Track Gain if Shuffling"
- </source>
- <dest>
- *: "Dziesmu Ja Jaukta Secība"
- </dest>
- <voice>
- *: "dziesmu ja jaukta seciiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPLAYGAIN_PREAMP
- desc: in replaygain settings
- user: core
- <source>
- *: "Pre-amp"
- </source>
- <dest>
- *: "PriekÅ¡pastiprinÄjums"
- </dest>
- <voice>
- *: "priekshpastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BEEP
- desc: in playback settings
- user: core
- <source>
- *: none
- swcodec: "Track Skip Beep"
- </source>
- <dest>
- *: none
- swcodec: "Dz.PÄrslÄ“gÅ¡anas PÄ«kstiens"
- </dest>
- <voice>
- *: none
- swcodec: "dziesmu paarsleegshanas piikstiens"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEAK
- desc: in beep volume in playback settings
- user: core
- <source>
- *: none
- swcodec: "Weak"
- </source>
- <dest>
- *: none
- swcodec: "VÄjÅ¡"
- </dest>
- <voice>
- *: none
- swcodec: "vaajsh"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MODERATE
- desc: in beep volume in playback settings
- user: core
- <source>
- *: none
- swcodec: "Moderate"
- </source>
- <dest>
- *: none
- swcodec: "Viduvējs"
- </dest>
- <voice>
- *: none
- swcodec: "viduveejs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STRONG
- desc: in beep volume in playback settings
- user: core
- <source>
- *: none
- swcodec: "Strong"
- </source>
- <dest>
- *: none
- swcodec: "Spēcīgs"
- </dest>
- <voice>
- *: none
- swcodec: "speeciigs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPDIF_ENABLE
- desc: in playback settings menu. enable/disable the optical out
- user: core
- <source>
- *: none
- spdif_power: "Optical Output"
- </source>
- <dest>
- *: none
- spdif_power: "OptiskÄ Izeja"
- </dest>
- <voice>
- *: none
- spdif_power: "optiskaa izeja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NEXT_FOLDER
- desc: in settings_menu. Should we allow move to next/prev folder from last/first track of current one
- user: core
- <source>
- *: "Auto-Change Directory"
- </source>
- <dest>
- *: "AutomÄtiski MainÄ«t Mapi"
- </dest>
- <voice>
- *: "automaatiski mainiit mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RANDOM
- desc: random folder
- user: core
- <source>
- *: "Random"
- </source>
- <dest>
- *: "JauktÄ SecÄ«bÄ"
- </dest>
- <voice>
- *: "jauktaa seciibaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUDIOSCROBBLER
- desc: "Last.fm Log" in the playback menu
- user: core
- <source>
- *: "Last.fm Log"
- </source>
- <dest>
- *: "Veidot Last.fm Logu"
- </dest>
- <voice>
- *: "veidot Last.fm logu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CUESHEET_ENABLE
- desc: cuesheet support option
- user: core
- <source>
- *: "Cuesheet Support"
- </source>
- <dest>
- *: "Cue Atbalsts"
- </dest>
- <voice>
- *: "cue atbalsts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HEADPHONE_UNPLUG
- desc: in settings_menu.
- user: core
- <source>
- *: none
- headphone_detection: "Pause on Headphone Unplug"
- </source>
- <dest>
- *: none
- headphone_detection: "Atvienojot Austiņas Nopauzēt"
- </dest>
- <voice>
- *: none
- headphone_detection: "atvienojot austinjas nopauzeet"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HEADPHONE_UNPLUG_RESUME
- desc: in pause_phones_menu.
- user: core
- <source>
- *: none
- headphone_detection: "Pause and Resume"
- </source>
- <dest>
- *: none
- headphone_detection: "NopauzÄ“t Un AtsÄkt"
- </dest>
- <voice>
- *: none
- headphone_detection: "nopauzeet un atsaakt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HEADPHONE_UNPLUG_RW
- desc: deprecated
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: none
- headphone_detection: "Attīšanas Ilgums"
- </dest>
- <voice>
- *: none
- headphone_detection: "attiishanas ilgums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME
- desc: in pause_phones_menu.
- user: core
- <source>
- *: none
- headphone_detection: "Disable resume on startup if phones unplugged"
- </source>
- <dest>
- *: none
- headphone_detection: "Izsl AtsÄkt Palaižot ja Austiņas Izrautas"
- </dest>
- <voice>
- *: none
- headphone_detection: "izsleegt automaatisku atsaakshanu ja austinjas ir izrautas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FILE
- desc: in settings_menu()
- user: core
- <source>
- *: "File View"
- </source>
- <dest>
- *: "Failu PÄrlÅ«ks"
- </dest>
- <voice>
- *: "failu paarluuks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_CASE
- desc: in settings_menu
- user: core
- <source>
- *: "Sort Case Sensitive"
- </source>
- <dest>
- *: "Šķirot Pēc Liel.Burt."
- </dest>
- <voice>
- *: "shkjirot peec lielajiem burtiem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_DIR
- desc: browser sorting setting
- user: core
- <source>
- *: "Sort Directories"
- </source>
- <dest>
- *: "Å Ä·irot Mapes"
- </dest>
- <voice>
- *: "shkjirot mapes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_FILE
- desc: browser sorting setting
- user: core
- <source>
- *: "Sort Files"
- </source>
- <dest>
- *: "Å Ä·irot Failus"
- </dest>
- <voice>
- *: "shkjirot failus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_ALPHA
- desc: browser sorting setting
- user: core
- <source>
- *: "Alphabetical"
- </source>
- <dest>
- *: "Alfabētiski"
- </dest>
- <voice>
- *: "alfabeetiski"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_DATE
- desc: browser sorting setting
- user: core
- <source>
- *: "By Date"
- </source>
- <dest>
- *: "Pēc Vecuma"
- </dest>
- <voice>
- *: "peec vecuma"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_DATE_REVERSE
- desc: browser sorting setting
- user: core
- <source>
- *: "By Newest Date"
- </source>
- <dest>
- *: "PÄ“c JaunÄkÄ"
- </dest>
- <voice>
- *: "peec jaunaakaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_TYPE
- desc: browser sorting setting
- user: core
- <source>
- *: "By Type"
- </source>
- <dest>
- *: "Pēc Veida"
- </dest>
- <voice>
- *: "peec veida"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FILTER
- desc: setting name for dir filter
- user: core
- <source>
- *: "Show Files"
- </source>
- <dest>
- *: "RÄdÄ«t Failus"
- </dest>
- <voice>
- *: "raadiit failus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FILTER_SUPPORTED
- desc: show all file types supported by Rockbox
- user: core
- <source>
- *: "Supported"
- </source>
- <dest>
- *: "Atbalstītos"
- </dest>
- <voice>
- *: "raadiit atbalstiitos failus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FILTER_MUSIC
- desc: show only music-related files
- user: core
- <source>
- *: "Music"
- </source>
- <dest>
- *: "Mūzikas"
- </dest>
- <voice>
- *: "raadiit tikai muuzikas failus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FOLLOW
- desc: in settings_menu
- user: core
- <source>
- *: "Follow Playlist"
- </source>
- <dest>
- *: "Sekot Sarakstam"
- </dest>
- <voice>
- *: "sekot sarakstam"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHOW_PATH
- desc: in settings_menu
- user: core
- <source>
- *: "Show Path"
- </source>
- <dest>
- *: "RÄdÄ«t Ceļu"
- </dest>
- <voice>
- *: "raadiit celju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHOW_PATH_CURRENT
- desc: in show path menu
- user: core
- <source>
- *: "Current Directory Only"
- </source>
- <dest>
- *: "Tikai Patreizējo Mapi"
- </dest>
- <voice>
- *: "tikai patreizeejo mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISPLAY_FULL_PATH
- desc: track display options
- user: core
- <source>
- *: "Full Path"
- </source>
- <dest>
- *: "Pilnu Ceļu"
- </dest>
- <voice>
- *: "pilnu celju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BUILDING_DATABASE
- desc: splash database building progress
- user: core
- <source>
- *: "Building database... %d found (OFF to return)"
- iriverh100,iriverh120,iriverh300: "Building database... %d found (STOP to return)"
- ipod*: "Building database... %d found (PREV to return)"
- iaudiox5,iaudiom5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)"
- iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Building database... %d found (PREV to return)"
- gogearsa9200: "Building database... %d found (REW to return)"
- archosplayer: "Building DB %d found"
- </source>
- <dest>
- *: "Veidoju datubÄzi... %d atrastas (OFF lai turpinÄtu)"
- iriverh100,iriverh120,iriverh300: "Veidoju datubÄzi... %d atrastas (STOP lai turpinÄtu)"
- ipod*: "Veidoju datubÄzi... %d atrastas (PREV lai turpinÄtu)"
- iaudiox5,iaudiom5,gigabeat*,mrobe100: "Veidoju datubÄzi... %d atrastas (LEFT lai turpinÄtu)"
- iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Veidoju datubÄzi... %d atrastas (PREV lai turpinÄtu)"
- gogearsa9200: "Veidoju datubÄzi... %d atrastas (REW lai turpinÄtu)"
- archosplayer: "Veidoju DB atrasts %d"
- </dest>
- <voice>
- *: "atrasti ieraksti datubaazei"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_RAM
- desc: in tag cache settings
- user: core
- <source>
- *: none
- tc_ramcache: "Load to RAM"
- </source>
- <dest>
- *: none
- tc_ramcache: "IelÄdÄ“t AtmiņÄ"
- </dest>
- <voice>
- *: none
- tc_ramcache: "ielaadeet operatiivajaa atminjaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_AUTOUPDATE
- desc: in tag cache settings
- user: core
- <source>
- *: "Auto Update"
- </source>
- <dest>
- *: "Atjaunot AutomÄtiski"
- </dest>
- <voice>
- *: "atjaunot automaatiski"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_FORCE_UPDATE
- desc: in tag cache settings
- user: core
- <source>
- *: "Initialize Now"
- </source>
- <dest>
- *: "Inicializēt Tagad"
- </dest>
- <voice>
- *: "inicializeet tagad"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_UPDATE
- desc: in tag cache settings
- user: core
- <source>
- *: "Update Now"
- </source>
- <dest>
- *: "Atjaunot Tagad"
- </dest>
- <voice>
- *: "atjaunot tagad"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RUNTIMEDB_ACTIVE
- desc: in settings_menu.
- user: core
- <source>
- *: "Gather Runtime Data"
- </source>
- <dest>
- *: "KrÄt Statistiku"
- </dest>
- <voice>
- *: "kraat statistiku"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_EXPORT
- desc: in tag cache settings
- user: core
- <source>
- *: "Export Modifications"
- </source>
- <dest>
- *: "Eksportēt Izmaiņas"
- </dest>
- <voice>
- *: "eksporteet izmainjas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_IMPORT
- desc: in tag cache settings
- user: core
- <source>
- *: "Import Modifications"
- </source>
- <dest>
- *: "Importēt Izmaiņas"
- </dest>
- <voice>
- *: "importeet izmainjas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_FORCE_UPDATE_SPLASH
- desc: in tag cache settings
- user: core
- <source>
- *: "Updating in background"
- </source>
- <dest>
- *: "Atjaunina fonÄ"
- </dest>
- <voice>
- *: "atjaunina fonaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_INIT
- desc: while initializing tagcache on boot
- user: core
- <source>
- *: "Committing database"
- </source>
- <dest>
- *: "Palaiž datubÄzi"
- </dest>
- <voice>
- *: "palaizh datubaazi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGCACHE_BUSY
- desc: when trying to shutdown and tagcache is committing
- user: core
- <source>
- *: "Database is not ready"
- </source>
- <dest>
- *: "DatubÄze vÄ“l darbojas"
- </dest>
- <voice>
- *: "datubaaze veel darbojas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGNAVI_ALL_TRACKS
- desc: "<All tracks>" entry in tag browser
- user: core
- <source>
- *: "<All tracks>"
- </source>
- <dest>
- *: "<Visas dziesmas>"
- </dest>
- <voice>
- *: "visas dziesmas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISPLAY
- desc: in settings_menu()
- user: core
- <source>
- *: "Display"
- </source>
- <dest>
- *: "Attēls"
- </dest>
- <voice>
- *: "atteels"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CUSTOM_FONT
- desc: in setting_menu()
- user: core
- <source>
- *: none
- lcd_bitmap: "Font"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Fonti"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "fonti"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WHILE_PLAYING
- desc: in settings_menu()
- user: core
- <source>
- *: "While Playing Screen"
- </source>
- <dest>
- *: "AtskaņoÅ¡anas EkrÄns"
- </dest>
- <voice>
- *: "atskanjoshanas ekraans"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_WHILE_PLAYING
- desc: in settings_menu()
- user: core
- <source>
- *: none
- remote: "Remote While Playing Screen"
- </source>
- <dest>
- *: none
- remote: "Pults AtskaņoÅ¡anas EkrÄns"
- </dest>
- <voice>
- *: none
- remote: "pults atskanjoshanas ekraans"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LCD_MENU
- desc: in the display sub menu
- user: core
- <source>
- *: "LCD Settings"
- </source>
- <dest>
- *: "EkrÄna UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "ekraana uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKLIGHT
- desc: in settings_menu
- user: core
- <source>
- *: "Backlight"
- </source>
- <dest>
- *: "Apgaismojums"
- </dest>
- <voice>
- *: "apgaismojums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKLIGHT_ON_WHEN_CHARGING
- desc: in display_settings_menu, backlight timeout with charger connected
- user: core
- <source>
- *: none
- charging: "Backlight (While Plugged In)"
- </source>
- <dest>
- *: none
- charging: "Apgaismojums (LÄdÄ“jot)"
- </dest>
- <voice>
- *: none
- charging: "apgaismojums laadeeshanas laikaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKLIGHT_ON_BUTTON_HOLD
- desc: in lcd settings
- user: core
- <source>
- *: none
- hold_button: "Backlight on Hold"
- </source>
- <dest>
- *: none
- hold_button: "Apgaismojums kad Hold"
- </dest>
- <voice>
- *: none
- hold_button: "apgaismojums ar noblokjeetiem taustinjiem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CAPTION_BACKLIGHT
- desc: in settings_menu
- user: core
- <source>
- *: "Caption Backlight"
- </source>
- <dest>
- *: "Nosaukuma Apgaismojums"
- </dest>
- <voice>
- *: "nosaukuma apgaismojums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKLIGHT_FADE_IN
- desc: in settings_menu
- user: core
- <source>
- *: none
- backlight_fade*: "Backlight Fade In"
- </source>
- <dest>
- *: none
- backlight_fade*: "Apgaismojuma iesl.laiks"
- </dest>
- <voice>
- *: none
- backlight_fade*: "apgaismojuma iesleegshanaas laiks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKLIGHT_FADE_OUT
- desc: in settings_menu
- user: core
- <source>
- *: none
- backlight_fade*: "Backlight Fade Out"
- </source>
- <dest>
- *: none
- backlight_fade*: "Apgaismojuma izsl.laiks"
- </dest>
- <voice>
- *: none
- backlight_fade*: "apgaismojuma izsleegshanaas laiks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS
- desc: Backlight behaviour setting
- user: core
- <source>
- *: "First Buttonpress Enables Backlight Only"
- </source>
- <dest>
- *: "Pirmais Spiediens Ieslēdz Tikai Apgaismojumu"
- </dest>
- <voice>
- *: "pirmais spiediens Iesleedz tikai apgaismojumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF
- desc: In display settings, time to switch LCD chip into power saving state
- user: core
- <source>
- *: none
- lcd_sleep: "Sleep (After Backlight Off)"
- </source>
- <dest>
- *: none
- lcd_sleep: "EkrÄna IzslÄ“gÅ¡anas Laiks"
- </dest>
- <voice>
- *: none
- lcd_sleep: "ekraana izsleegshanas laiks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NEVER
- desc: in lcd settings
- user: core
- <source>
- *: none
- lcd_sleep: "Never"
- </source>
- <dest>
- *: none
- lcd_sleep: "Nekad"
- </dest>
- <voice>
- *: none
- lcd_sleep: "nekad"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BRIGHTNESS
- desc: in settings_menu
- user: core
- <source>
- *: none
- backlight_brightness: "Brightness"
- </source>
- <dest>
- *: none
- backlight_brightness: "Spilgtums"
- </dest>
- <voice>
- *: none
- backlight_brightness: "spilgtums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CONTRAST
- desc: in settings_menu
- user: core
- <source>
- *: "Contrast"
- </source>
- <dest>
- *: "Kontrasts"
- </dest>
- <voice>
- *: "kontrasts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_invert,remote_lcd_invert: "LCD Mode"
- </source>
- <dest>
- *: none
- lcd_invert,remote_lcd_invert: "EkrÄna Režīms"
- </dest>
- <voice>
- *: none
- lcd_invert,remote_lcd_invert: "ekraana rezhiims"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT_LCD_INVERSE
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_invert,remote_lcd_invert: "Inverse"
- </source>
- <dest>
- *: none
- lcd_invert,remote_lcd_invert: "Negatīvs"
- </dest>
- <voice>
- *: none
- lcd_invert,remote_lcd_invert: "negatiivs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FLIP_DISPLAY
- desc: in settings_menu, option to turn display+buttos by 180 degrees
- user: core
- <source>
- *: none
- lcd_bitmap: "Upside Down"
- </source>
- <dest>
- *: none
- lcd_bitmap: "KÄjÄm GaisÄ"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "kaajaam gaisaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT_CURSOR
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Line Selector Type"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Līnija"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "liinija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT_CURSOR_POINTER
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Pointer"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Kursors"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "kursors"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT_CURSOR_BAR
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Bar (Inverse)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Rinda (Apvērsta)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "apveersta rinda"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CLEAR_BACKDROP
- desc: text for LCD settings menu
- user: core
- <source>
- *: none
- lcd_non-mono: "Clear Backdrop"
- </source>
- <dest>
- *: none
- lcd_non-mono: "NovÄkt Fonu"
- </dest>
- <voice>
- *: none
- lcd_non-mono: "novaakt fonu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKGROUND_COLOR
- desc: menu entry to set the background color
- user: core
- <source>
- *: none
- lcd_color: "Background Colour"
- </source>
- <dest>
- *: none
- lcd_color: "Fona KrÄsa"
- </dest>
- <voice>
- *: none
- lcd_color: "fona kraasa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FOREGROUND_COLOR
- desc: menu entry to set the foreground color
- user: core
- <source>
- *: none
- lcd_color: "Foreground Colour"
- </source>
- <dest>
- *: none
- lcd_color: "PriekÅ¡plÄna KrÄsa"
- </dest>
- <voice>
- *: none
- lcd_color: "priekshplaana kraasa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET_COLORS
- desc: menu
- user: core
- <source>
- *: none
- lcd_color: "Reset Colours"
- </source>
- <dest>
- *: none
- lcd_color: "NoklusÄ“tÄs KrÄsas"
- </dest>
- <voice>
- *: none
- lcd_color: "nokluseetaas kraasas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COLOR_RGB_LABELS
- desc: what to show for the 'R' 'G' 'B' ONE LETTER EACH
- user: core
- <source>
- *: none
- lcd_color: "RGB"
- </source>
- <dest>
- *: none
- lcd_color: "SaZaZi"
- </dest>
- <voice>
- *: none
- lcd_color: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_COLOR_RGB_VALUE
- desc: in color screen
- user: core
- <source>
- *: none
- lcd_color: "RGB: %02X%02X%02X"
- </source>
- <dest>
- *: none
- lcd_color: "SaZaZi: %02X%02X%02X"
- </dest>
- <voice>
- *: none
- lcd_color: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_COLOR_UNACCEPTABLE
- desc: splash when user selects an invalid colour
- user: core
- <source>
- *: none
- lcd_color: "Invalid colour"
- </source>
- <dest>
- *: none
- lcd_color: "NederÄ«ga KrÄsa"
- </dest>
- <voice>
- *: none
- lcd_color: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_LCD_REMOTE_MENU
- desc: in the display sub menu
- user: core
- <source>
- *: none
- remote: "Remote-LCD Settings"
- </source>
- <dest>
- *: none
- remote: "Pults EkrÄna UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: none
- remote: "pults ekraana uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REDUCE_TICKING
- desc: in remote lcd settings menu
- user: core
- <source>
- *: none
- remote_ticking: "Reduce Ticking"
- </source>
- <dest>
- *: none
- remote_ticking: "SamazinÄt Tikšķi"
- </dest>
- <voice>
- *: none
- remote_ticking: "samazinaat tikshkji"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHOW_ICONS
- desc: in settings_menu
- user: core
- <source>
- *: "Show Icons"
- </source>
- <dest>
- *: "RÄdÄ«t Ikonas"
- </dest>
- <voice>
- *: "raadiit ikonas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_MENU
- desc: in display_settings_menu()
- user: core
- <source>
- *: "Scrolling"
- </source>
- <dest>
- *: "Rullēšana"
- </dest>
- <voice>
- *: "rulleeshana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL
- desc: in settings_menu
- user: core
- <source>
- *: "Scroll Speed Setting Example"
- </source>
- <dest>
- *: "Rullēšanas Ātruma Piemērs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_SPEED
- desc: in display_settings_menu()
- user: core
- <source>
- *: "Scroll Speed"
- </source>
- <dest>
- *: "Rullēšanas Ātrums"
- </dest>
- <voice>
- *: "rulleeshanas aatrums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_DELAY
- desc: Delay before scrolling
- user: core
- <source>
- *: "Scroll Start Delay"
- </source>
- <dest>
- *: "Rullēšanas Aizture"
- </dest>
- <voice>
- *: "rulleeshanas aizture"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_STEP
- desc: Pixels to advance per scroll
- user: core
- <source>
- *: "Scroll Step Size"
- </source>
- <dest>
- *: "Rullēšanas Solis"
- </dest>
- <voice>
- *: "rulleeshanas solis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_STEP_EXAMPLE
- desc: Pixels to advance per scroll
- user: core
- <source>
- *: "Scroll Step Size Setting Example Text"
- </source>
- <dest>
- *: "Rullēšanas Soļa Piemērs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_BIDIR_SCROLL
- desc: Bidirectional scroll limit
- user: core
- <source>
- *: "Bidirectional Scroll Limit"
- </source>
- <dest>
- *: "Abpusējas Rullēšanas Limits"
- </dest>
- <voice>
- *: "abpuseejas rulleeshanas limits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_SCROLL_SETS
- desc: "Remote Scrolling Options" Submenu in "Scrolling Options" menu
- user: core
- <source>
- *: none
- remote: "Remote Scrolling Options"
- </source>
- <dest>
- *: none
- remote: "Pults Rullēšanas Opcijas"
- </dest>
- <voice>
- *: none
- remote: "pults rulleeshanas opcijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCREEN_SCROLL_VIEW
- desc: should lines scroll out of the screen
- user: core
- <source>
- *: none
- lcd_bitmap: "Screen Scrolls Out Of View"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Teksts IzrullÄ“jas Ä€rpus EkrÄna"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "teksts izrulleejas aarpus ekraana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCREEN_SCROLL_STEP
- desc: Pixels to advance per Screen scroll
- user: core
- <source>
- *: none
- lcd_bitmap: "Screen Scroll Step Size"
- </source>
- <dest>
- *: none
- lcd_bitmap: "EkrÄna Rullēšanas Solis"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "ekraana rulleeshanas solis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_PAGINATED
- desc: jump to new page when scrolling
- user: core
- <source>
- *: "Paged Scrolling"
- </source>
- <dest>
- *: "Rullēt Lapas"
- </dest>
- <voice>
- *: "rulleet lapas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LISTACCEL_START_DELAY
- desc: Delay before list starts accelerating
- user: core
- <source>
- *: "List Acceleration Start Delay"
- wheel_acceleration: none
- </source>
- <dest>
- *: "Saraksta Rullēšanas Aizture"
- wheel_acceleration: none
- </dest>
- <voice>
- *: "saraksta rulleeshanas aizture"
- wheel_acceleration: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_LISTACCEL_ACCEL_SPEED
- desc: list acceleration speed
- user: core
- <source>
- *: "List Acceleration Speed"
- wheel_acceleration: none
- </source>
- <dest>
- *: "Saraksta PaÄtrinÄjums"
- wheel_acceleration: none
- </dest>
- <voice>
- *: "saraksta paaatrinaajums"
- wheel_acceleration: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_BARS_MENU
- desc: in the display sub menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Status-/Scrollbar"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Statusa-/Rulljosla"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "statusa rulljosla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLL_BAR
- desc: display menu, F3 substitute
- user: core
- <source>
- *: none
- lcd_bitmap: "Scroll Bar"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Rulljosla"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "rulljosla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STATUS_BAR
- desc: display menu, F3 substitute
- user: core
- <source>
- *: none
- lcd_bitmap: "Status Bar"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Statusa Josla"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "statusa josla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BUTTON_BAR
- desc: in settings menu
- user: core
- <source>
- *: none
- recorder_pad: "Button Bar"
- </source>
- <dest>
- *: none
- recorder_pad: "Pogu Josla"
- </dest>
- <voice>
- *: none
- recorder_pad: "pogu josla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOLUME_DISPLAY
- desc: Volume type title
- user: core
- <source>
- *: none
- lcd_bitmap: "Volume Display"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Skaļuma Attēlošana"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "skaljuma atteeloshana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_DISPLAY
- desc: Battery type title
- user: core
- <source>
- *: none
- lcd_bitmap: "Battery Display"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Batterijas Attēlošana"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "baterijas atteeloshana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISPLAY_GRAPHIC
- desc: Label for type of icon display
- user: core
- <source>
- *: none
- lcd_bitmap: "Graphic"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Grafiski"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "grafiski"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISPLAY_NUMERIC
- desc: Label for type of icon display
- user: core
- <source>
- *: none
- lcd_bitmap: "Numeric"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Numeriski"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "numeriski"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_MENU
- desc: in the display menu
- user: core
- <source>
- *: "Peak Meter"
- masd: none
- </source>
- <dest>
- *: "Līmeņa Indikators"
- masd: none
- </dest>
- <voice>
- *: "liimenja indikators"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_CLIP_HOLD
- desc: in the peak meter menu
- user: core
- <source>
- *: "Clip Hold Time"
- masd: none
- </source>
- <dest>
- *: "Kropļojuma Aizture"
- masd: none
- </dest>
- <voice>
- *: "kropljojuma indikaacijas aizture"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_PEAK_HOLD
- desc: in the peak meter menu
- user: core
- <source>
- *: "Peak Hold Time"
- masd: none
- </source>
- <dest>
- *: "Pīķa Aiztures"
- masd: none
- </dest>
- <voice>
- *: "piikja indikaacijas aizture"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_ETERNAL
- desc: in the peak meter menu
- user: core
- <source>
- *: "Eternal"
- masd: none
- </source>
- <dest>
- *: "Ārējs"
- masd: none
- </dest>
- <voice>
- *: "aareejs"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_RELEASE
- desc: in the peak meter menu
- user: core
- <source>
- *: "Peak Release"
- masd: none
- </source>
- <dest>
- *: "Pīķa Atlaišana"
- masd: none
- </dest>
- <voice>
- *: "piikja indikaacijas atlaishana"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_SCALE
- desc: in the peak meter menu
- user: core
- <source>
- *: "Scale"
- masd: none
- </source>
- <dest>
- *: "Skala"
- masd: none
- </dest>
- <voice>
- *: "skala"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_DBFS
- desc: in the peak meter menu
- user: core
- <source>
- *: "Logarithmic (dB)"
- masd: none
- </source>
- <dest>
- *: "LogaritmiskÄ (dB)"
- masd: none
- </dest>
- <voice>
- *: "logaritmiskaa decibelu"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_LINEAR
- desc: in the peak meter menu
- user: core
- <source>
- *: "Linear (%)"
- masd: none
- </source>
- <dest>
- *: "LineÄrÄ (%)"
- masd: none
- </dest>
- <voice>
- *: "lineaaraa procentu"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_MIN
- desc: in the peak meter menu
- user: core
- <source>
- *: "Minimum Of Range"
- masd: none
- </source>
- <dest>
- *: "Skalas SÄkums"
- masd: none
- </dest>
- <voice>
- *: "skalas saakums"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_MAX
- desc: in the peak meter menu
- user: core
- <source>
- *: "Maximum Of Range"
- masd: none
- </source>
- <dest>
- *: "Skalas Beigas"
- masd: none
- </dest>
- <voice>
- *: "skalas beigas"
- masd: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_DEFAULT_CODEPAGE
- desc: default encoding used with id3 tags
- user: core
- <source>
- *: "Default Codepage"
- </source>
- <dest>
- *: "Noklusētais Kodējums"
- </dest>
- <voice>
- *: "nokluseetais kodeejums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_LATIN1
- desc: in codepage setting menu
- user: core
- <source>
- *: "Latin1 (ISO-8859-1)"
- </source>
- <dest>
- *: "Latīņu1 (ISO-8859-1)"
- </dest>
- <voice>
- *: "latiinju viens"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_GREEK
- desc: in codepage setting menu
- user: core
- <source>
- *: "Greek (ISO-8859-7)"
- </source>
- <dest>
- *: "GrieÄ·u (ISO-8859-7)"
- </dest>
- <voice>
- *: "griekju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_HEBREW
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Hebrew (ISO-8859-8)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Ebreju (ISO-8859-8)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "ebreju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_CYRILLIC
- desc: in codepage setting menu
- user: core
- <source>
- *: "Cyrillic (CP1251)"
- </source>
- <dest>
- *: "Kirilica (CP1251)"
- </dest>
- <voice>
- *: "kirilica"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_THAI
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Thai (ISO-8859-11)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Tai (ISO-8859-11)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "tai"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_ARABIC
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Arabic (CP1256)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "ArÄbu (CP1256)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "araabu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_TURKISH
- desc: in codepage setting menu
- user: core
- <source>
- *: "Turkish (ISO-8859-9)"
- </source>
- <dest>
- *: "Turku (ISO-8859-9)"
- </dest>
- <voice>
- *: "turku"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_LATIN_EXTENDED
- desc: in codepage setting menu
- user: core
- <source>
- *: "Latin Extended (ISO-8859-2)"
- </source>
- <dest>
- *: "Latīņu Paplašin. (ISO-8859-2)"
- </dest>
- <voice>
- *: "latiinju paplashinaatais"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_JAPANESE
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Japanese (SJIS)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "JapÄņu (SJIS)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "Japaanju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_SIMPLIFIED
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Simp. Chinese (GB2312)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Vienk. Ķīniešu (GB2312)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "vienkaarshotais kjiinieshu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_KOREAN
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Korean (KSX1001)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Korejiešu (KSX1001)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "korejieshu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_TRADITIONAL
- desc: in codepage setting menu
- user: core
- <source>
- *: none
- lcd_bitmap: "Trad. Chinese (BIG5)"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Trad. Ķīniešu (BIG5)"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "tradicionaalais kjiinieshu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_UTF8
- desc: in codepage setting menu
- user: core
- <source>
- *: "Unicode (UTF-8)"
- </source>
- <dest>
- *: "Unikods (UTF-8)"
- </dest>
- <voice>
- *: "unikods"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BUTTONLIGHT_TIMEOUT
- desc: in settings_menu
- user: core
- <source>
- *: none
- button_light: "Button Light Timeout"
- sansafuze*,sansae200*: "Wheel Light Timeout"
- </source>
- <dest>
- *: none
- button_light: "Pogu Apgaismojums"
- sansafuze*,sansae200*: "Ripuļa Apgaismojums"
- </dest>
- <voice>
- *: none
- button_light: "pogu apgaismojums"
- sansafuze*,sansae200*: "ripulja apgaismojums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BUTTONLIGHT_BRIGHTNESS
- desc: in settings_menu
- user: core
- <source>
- *: none
- buttonlight_brightness: "Button Light Brightness"
- </source>
- <dest>
- *: none
- buttonlight_brightness: "Pogu Spilgtums"
- </dest>
- <voice>
- *: none
- buttonlight_brightness: "pogu spilgtums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_START_SCREEN
- desc: in the system sub menu
- user: core
- <source>
- *: "Start Screen"
- </source>
- <dest>
- *: "SÄkuma Logs"
- </dest>
- <voice>
- *: "saakuma logs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MAIN_MENU
- desc: in start screen setting
- user: core
- <source>
- *: "Main Menu"
- </source>
- <dest>
- *: "GalvenÄ IzvÄ“lne"
- </dest>
- <voice>
- *: "galvenaa izveelne"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PREVIOUS_SCREEN
- desc: in start screen setting
- user: core
- <source>
- *: "Previous Screen"
- </source>
- <dest>
- *: "IepriekšējÄ IzvÄ“lne"
- </dest>
- <voice>
- *: "ieprieksheejaa izveelne"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_MENU
- desc: in the system sub menu
- user: core
- <source>
- *: "Battery"
- </source>
- <dest>
- *: "Baterija"
- </dest>
- <voice>
- *: "baterija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_CAPACITY
- desc: in settings_menu
- user: core
- <source>
- *: "Battery Capacity"
- </source>
- <dest>
- *: "Ietilpība"
- </dest>
- <voice>
- *: "baterijas ietilpiiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_TYPE
- desc: in battery settings
- user: core
- <source>
- *: none
- battery_types: "Battery Type"
- </source>
- <dest>
- *: none
- battery_types: "Veids"
- </dest>
- <voice>
- *: none
- battery_types: "veids"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_TYPE_ALKALINE
- desc: in battery settings
- user: core
- <source>
- *: none
- battery_types: "Alkaline"
- </source>
- <dest>
- *: none
- battery_types: "SÄrma"
- </dest>
- <voice>
- *: none
- battery_types: "saarma"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_TYPE_NIMH
- desc: in battery settings
- user: core
- <source>
- *: none
- battery_types: "NiMH"
- </source>
- <dest>
- *: none
- battery_types: "NiMH"
- </dest>
- <voice>
- *: none
- battery_types: "nikjelja metaalhidraata"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISK_MENU
- desc: in the system sub menu
- user: core
- <source>
- *: "Disk"
- </source>
- <dest>
- *: "Disks"
- </dest>
- <voice>
- *: "disks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPINDOWN
- desc: in settings_menu
- user: core
- <source>
- *: "Disk Spindown"
- flash_storage: none
- </source>
- <dest>
- *: "Diska ApstÄdinÄÅ¡ana"
- flash_storage: none
- </dest>
- <voice>
- *: "diska apstaadinaashana"
- flash_storage: none
- </voice>
-</phrase>
-<phrase>
- id: LANG_DIRCACHE_ENABLE
- desc: in directory cache settings
- user: core
- <source>
- *: none
- dircache: "Directory Cache"
- </source>
- <dest>
- *: none
- dircache: "Mapju Buferis"
- </dest>
- <voice>
- *: none
- dircache: "mapju buferis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TIME_MENU
- desc: in the system sub menu
- user: core
- <source>
- *: none
- rtc: "Time & Date"
- </source>
- <dest>
- *: none
- rtc: "Laiks & Datums"
- </dest>
- <voice>
- *: none
- rtc: "laiks un datums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SET_TIME
- desc: in settings_menu
- user: core
- <source>
- *: none
- rtc: "Set Time/Date"
- </source>
- <dest>
- *: none
- rtc: "UzstÄdÄ«t Laiku/Datumu"
- </dest>
- <voice>
- *: none
- rtc: "uzstaadiit laiku un datumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TIMEFORMAT
- desc: select the time format of time in status bar
- user: core
- <source>
- *: none
- rtc: "Time Format"
- </source>
- <dest>
- *: none
- rtc: "Laika FormÄts"
- </dest>
- <voice>
- *: none
- rtc: "laika formaats"
- </voice>
-</phrase>
-<phrase>
- id: LANG_12_HOUR_CLOCK
- desc: option for 12 hour clock
- user: core
- <source>
- *: none
- rtc: "12 Hour Clock"
- </source>
- <dest>
- *: none
- rtc: "12 Stundu Pulkstenis"
- </dest>
- <voice>
- *: none
- rtc: "divpadsmit stundu pulkstenis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_24_HOUR_CLOCK
- desc: option for 24 hour clock
- user: core
- <source>
- *: none
- rtc: "24 Hour Clock"
- </source>
- <dest>
- *: none
- rtc: "24 Stundu Pulkstenis"
- </dest>
- <voice>
- *: none
- rtc: "divdesmit chetru stundu pulkstenis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TIME_SET_BUTTON
- desc: used in set_time()
- user: core
- <source>
- *: none
- rtc: "ON = Set"
- mrobe500: "HEART = Set"
- iriverh100,iriverh120,iriverh300: "NAVI = Set"
- ipod*,iaudiox5,iaudiom5,iriverh10,iriverh10_5gb,sansae200*,sansac200*,gigabeat*,mrobe100,sansaclip*,sansafuze*: "SELECT = Set"
- gogearsa9200: "PLAY = Set"
- vibe500: "OK = Set"
- mpiohd300: "ENTER = Set"
- </source>
- <dest>
- *: none
- rtc: "ON = UzstÄdÄ«t"
- mrobe500: "HEART = UzstÄdÄ«t"
- iriverh100,iriverh120,iriverh300: "NAVI = UzstÄdÄ«t"
- ipod*,iaudiox5,iaudiom5,iriverh10,iriverh10_5gb,sansae200*,sansac200*,gigabeat*,mrobe100,sansaclip*,sansafuze*: "SELECT = UzstÄdÄ«t"
- gogearsa9200: "PLAY = UzstÄdÄ«t"
- vibe500: "OK = UzstÄdÄ«t"
- mpiohd300: "ENTER = UzstÄdÄ«t"
- </dest>
- <voice>
- *: none
- rtc,iriverh100,iriverh120,iriverh300,iriverh10,iriverh10_5gb,iaudiox5,iaudiom5,ipod*,sansae200*,sansac200*,gigabeat*,mrobe100,gogearsa9200: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_TIME_REVERT
- desc: used in set_time()
- user: core
- <source>
- *: none
- rtc: "OFF = Revert"
- mrobe500: "POWER = Revert"
- iriverh100,iriverh120,iriverh300: "STOP = Revert"
- ipod*,sansac200*,mpiohd300: "MENU = Revert"
- iaudiox5,iaudiom5: "RECORD = Revert"
- iriverh10,iriverh10_5gb,sansae200*,sansafuze*: "PREV = Revert"
- gigabeatfx: "POWER = Revert"
- mrobe100: "DISPLAY = Revert"
- gigabeats: "BACK = Revert"
- gogearsa9200: "LEFT = Revert"
- vibe500: "CANCEL = Revert"
- </source>
- <dest>
- *: none
- rtc: "OFF = Atcelt"
- mrobe500: "POWER = Atcelt"
- iriverh100,iriverh120,iriverh300: "STOP = Atcelt"
- ipod*,sansac200*,mpiohd300: "MENU = Atcelt"
- iaudiox5,iaudiom5: "RECORD = Atcelt"
- iriverh10,iriverh10_5gb,sansae200*,sansafuze*: "PREV = Atcelt"
- gigabeatfx: "POWER = Atcelt"
- mrobe100: "DISPLAY = Atcelt"
- gigabeats: "BACK = Atcelt"
- gogearsa9200: "LEFT = Atcelt"
- vibe500: "CANCEL = Atcelt"
- </dest>
- <voice>
- *: none
- rtc,iriverh100,iriverh120,iriverh300,ipod*,sansae200*,sansac200*,iaudiox5,iaudiom5,iriverh10,iriverh10_5gb,gigabeat*,mrobe100,gogearsa9200: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_SUNDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Sun"
- </source>
- <dest>
- *: none
- rtc: "Sv"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_MONDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Mon"
- </source>
- <dest>
- *: none
- rtc: "Prm"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_TUESDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Tue"
- </source>
- <dest>
- *: none
- rtc: "Otr"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_WEDNESDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Wed"
- </source>
- <dest>
- *: none
- rtc: "Tre"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_THURSDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Thu"
- </source>
- <dest>
- *: none
- rtc: "Cet"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_FRIDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Fri"
- </source>
- <dest>
- *: none
- rtc: "Pkt"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_WEEKDAY_SATURDAY
- desc: Maximum 3-letter abbreviation for weekday
- user: core
- <source>
- *: none
- rtc: "Sat"
- </source>
- <dest>
- *: none
- rtc: "Sst"
- </dest>
- <voice>
- *: none
- rtc: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_JANUARY
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Jan"
- </source>
- <dest>
- *: none
- rtc: "Jan"
- </dest>
- <voice>
- *: none
- rtc: "janvaaris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_FEBRUARY
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Feb"
- </source>
- <dest>
- *: none
- rtc: "Feb"
- </dest>
- <voice>
- *: none
- rtc: "februaaris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_MARCH
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Mar"
- </source>
- <dest>
- *: none
- rtc: "Mar"
- </dest>
- <voice>
- *: none
- rtc: "marts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_APRIL
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Apr"
- </source>
- <dest>
- *: none
- rtc: "Apr"
- </dest>
- <voice>
- *: none
- rtc: "apriilis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_MAY
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "May"
- </source>
- <dest>
- *: none
- rtc: "Mai"
- </dest>
- <voice>
- *: none
- rtc: "maijs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_JUNE
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Jun"
- </source>
- <dest>
- *: none
- rtc: "Jūn"
- </dest>
- <voice>
- *: none
- rtc: "juunijs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_JULY
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Jul"
- </source>
- <dest>
- *: none
- rtc: "Jūl"
- </dest>
- <voice>
- *: none
- rtc: "juulijs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_AUGUST
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Aug"
- </source>
- <dest>
- *: none
- rtc: "Aug"
- </dest>
- <voice>
- *: none
- rtc: "augusts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_SEPTEMBER
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Sep"
- </source>
- <dest>
- *: none
- rtc: "Sep"
- </dest>
- <voice>
- *: none
- rtc: "septembris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_OCTOBER
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Oct"
- </source>
- <dest>
- *: none
- rtc: "Okt"
- </dest>
- <voice>
- *: none
- rtc: "oktobris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_NOVEMBER
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Nov"
- </source>
- <dest>
- *: none
- rtc: "Nov"
- </dest>
- <voice>
- *: none
- rtc: "novembris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MONTH_DECEMBER
- desc: Maximum 3-letter abbreviation for monthname
- user: core
- <source>
- *: none
- rtc: "Dec"
- </source>
- <dest>
- *: none
- rtc: "Dec"
- </dest>
- <voice>
- *: none
- rtc: "decembris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_POWEROFF_IDLE
- desc: in settings_menu
- user: core
- <source>
- *: "Idle Poweroff"
- </source>
- <dest>
- *: "AutomÄtiskÄ IzslÄ“gÅ¡anÄs"
- </dest>
- <voice>
- *: "automaatiskaa izsleegshanaas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SLEEP_TIMER
- desc: sleep timer setting
- user: core
- <source>
- *: "Sleep Timer"
- </source>
- <dest>
- *: "Miega Taimeris"
- </dest>
- <voice>
- *: "miega taimeris"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LIMITS_MENU
- desc: in the system sub menu
- user: core
- <source>
- *: "Limits"
- </source>
- <dest>
- *: "Ierobežojumi"
- </dest>
- <voice>
- *: "ierobezhojumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MAX_FILES_IN_DIR
- desc: in settings_menu
- user: core
- <source>
- *: "Max Entries in File Browser"
- </source>
- <dest>
- *: "Maks. Faili PÄrlÅ«kÄ"
- </dest>
- <voice>
- *: "maksimaalais failu skaits paarluukaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MAX_FILES_IN_PLAYLIST
- desc: in settings_menu
- user: core
- <source>
- *: "Max Playlist Size"
- </source>
- <dest>
- *: "Maks Saraksta Izmērs"
- </dest>
- <voice>
- *: "maksimaalais dziesmu saraksta izmeers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CAR_ADAPTER_MODE
- desc: Displayed for setting car adapter mode to on/off
- user: core
- <source>
- *: none
- charging: "Car Adapter Mode"
- </source>
- <dest>
- *: none
- charging: "Automašīnas Režīms"
- </dest>
- <voice>
- *: none
- charging: "automashiinas rezhiims"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_ALARM_MENU
- desc: The name of the additional entry in the main menu for the RTC alarm mod.
- user: core
- <source>
- *: none
- alarm: "Wake-Up Alarm"
- </source>
- <dest>
- *: none
- alarm: "ModinÄtÄjs"
- </dest>
- <voice>
- *: none
- alarm: "modinaataajs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_WAKEUP_SCREEN
- desc: in alarm menu setting
- user: core
- <source>
- *: none
- alarm: "Alarm Wake up Screen"
- </source>
- <dest>
- *: none
- alarm: "ModinÄtÄja DarbÄ«ba"
- </dest>
- <voice>
- *: none
- alarm: "modinaataaja darbiiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_TIME
- desc: The current alarm time shown in the alarm menu for the RTC alarm mod.
- user: core
- <source>
- *: none
- alarm: "Alarm Time:"
- </source>
- <dest>
- *: none
- alarm: "ModinÄtÄja laiks:"
- </dest>
- <voice>
- *: none
- alarm: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_TIME_TO_GO
- desc: The time until the alarm will go off shown in the alarm menu for the RTC alarm mod.
- user: core
- <source>
- *: none
- alarm: "Waking Up In %d:%02d"
- </source>
- <dest>
- *: none
- alarm: "PamoÅ¡anÄs %d:%02d"
- </dest>
- <voice>
- *: none
- alarm: "pamoshanaas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_SHUTDOWN
- desc: The text that tells the user that the alarm time is ok and the device shuts off (for the RTC alarm mod).
- user: core
- <source>
- *: none
- alarm: "Alarm Set"
- </source>
- <dest>
- *: none
- alarm: "ModinÄtÄjs IeslÄ“gts"
- </dest>
- <voice>
- *: none
- alarm: "modinaataajs ir iesleegts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_ERROR
- desc: The text that tells that the time is incorrect (for the RTC alarm mod).
- user: core
- <source>
- *: none
- alarm: "Alarm Time Is Too Soon!"
- </source>
- <dest>
- *: none
- alarm: "Laiks ir pÄrÄk drÄ«z!"
- </dest>
- <voice>
- *: none
- alarm: "modinaashanas laiks ir paaraak driiz!"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_KEYS
- desc: Shown key functions in alarm menu (for the RTC alarm mod).
- user: core
- <source>
- *: none
- alarm: "PLAY=Set OFF=Cancel"
- ipod*: "SELECT=Set MENU=Cancel"
- iriverh10,iriverh10_5gb: "SELECT=Set PREV=Cancel"
- gigabeats: "SELECT=Set POWER=Cancel"
- vibe500: "OK=Set C=Cancel"
- mpiohd300: "ENTER=Set MENU=Cancel"
- </source>
- <dest>
- *: none
- alarm: "PLAY=Uzst OFF=Atteikties"
- ipod*: "SELECT=Uzst MENU=Atteikties"
- iriverh10,iriverh10_5gb: "SELECT=Uzst PREV=Atteikties"
- gigabeats: "SELECT=Uzst POWER=Atteikties"
- vibe500: "OK=Uzst C=Atteikties"
- mpiohd300: "ENTER=Uzst MENU=Atteikties"
- </dest>
- <voice>
- *: none
- alarm,ipod*: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ALARM_MOD_DISABLE
- desc: Announce that the RTC alarm has been turned off
- user: core
- <source>
- *: none
- alarm: "Alarm Disabled"
- </source>
- <dest>
- *: none
- alarm: "ModinÄtÄjs IzslÄ“gts"
- </dest>
- <voice>
- *: none
- alarm: "modinaataajs izsleegts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS
- desc: in general settings
- user: core
- <source>
- *: "Bookmarking"
- </source>
- <dest>
- *: "GrÄmatzÄ«mes"
- </dest>
- <voice>
- *: "graamatziimes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_AUTOCREATE
- desc: prompt for user to decide to create an bookmark
- user: core
- <source>
- *: "Bookmark on Stop"
- </source>
- <dest>
- *: "GrÄmatzÄ«me ApstÄjoties"
- </dest>
- <voice>
- *: "izveidot graamatziimi apstaajoties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES
- desc: Save in recent bookmarks only
- user: core
- <source>
- *: "Yes - Recent only"
- </source>
- <dest>
- *: "JÄ - Tikai pÄ“dÄ“jo"
- </dest>
- <voice>
- *: "jaa tikai peedeejo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK
- desc: Save in recent bookmarks only
- user: core
- <source>
- *: "Ask - Recent only"
- </source>
- <dest>
- *: "JautÄt - Tikai pÄ“dÄ“jo"
- </dest>
- <voice>
- *: "jautaat tikai peedeejo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_AUTOLOAD
- desc: prompt for user to decide to create a bookmark
- user: core
- <source>
- *: "Load Last Bookmark"
- </source>
- <dest>
- *: "IelÄdÄ“t PÄ“dÄ“jo GrÄmatzÄ«mi"
- </dest>
- <voice>
- *: "ielaadeet peedeejo graamatziimi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS
- desc: Configuration option to maintain a list of recent bookmarks
- user: core
- <source>
- *: "Maintain a List of Recent Bookmarks?"
- </source>
- <dest>
- *: "UzturÄ“t GrÄmatzÄ«mju Sarakstu?"
- </dest>
- <voice>
- *: "vai uztureet peedeejo graamatziimju sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY
- desc: Save only on bookmark for each playlist in recent bookmarks
- user: core
- <source>
- *: "Unique only"
- </source>
- <dest>
- *: "Tikai unikÄlu"
- </dest>
- <voice>
- *: "tikai unikaalu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LANGUAGE
- desc: in settings_menu
- user: core
- <source>
- *: "Language"
- </source>
- <dest>
- *: "Valoda"
- </dest>
- <voice>
- *: "valoda"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LANGUAGE_LOADED
- desc: shown when a language has been loaded from the dir browser
- user: core
- <source>
- *: "New Language"
- </source>
- <dest>
- *: "Valoda Nomainīta"
- </dest>
- <voice>
- *: "valoda nomainiita"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE
- desc: root of voice menu
- user: core
- <source>
- *: "Voice"
- </source>
- <dest>
- *: "Balss"
- </dest>
- <voice>
- *: "balss"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_MENU
- desc: item of voice menu, enable/disable the voice UI
- user: core
- <source>
- *: "Voice Menus"
- </source>
- <dest>
- *: "IzrunÄt IzvÄ“lnes"
- </dest>
- <voice>
- *: "izrunaat izveelnes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_DIR
- desc: item of voice menu, set the voice mode for directories
- user: core
- <source>
- *: "Voice Directories"
- </source>
- <dest>
- *: "IzrunÄt Mapes"
- </dest>
- <voice>
- *: "izrunaat mapes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_DIR_TALK
- desc: Item of voice menu, whether to use directory .talk clips
- user: core
- <source>
- *: "Use Directory .talk Clips"
- </source>
- <dest>
- *: "Izmantot Mapes .talk Klipus"
- </dest>
- <voice>
- *: "izmantot mapes .talk klipus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_FILE
- desc: item of voice menu, set the voice mode for files
- user: core
- <source>
- *: "Voice Filenames"
- </source>
- <dest>
- *: "IzrunÄt Failu Nosaukumus"
- </dest>
- <voice>
- *: "izrunaat failu nosaukumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_FILE_TALK
- desc: Item of voice menu, whether to use file .talk clips
- user: core
- <source>
- *: "Use File .talk Clips"
- </source>
- <dest>
- *: "Izmantot Failu .talk Klipus"
- </dest>
- <voice>
- *: "izmantot failu .talk klipus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_NUMBER
- desc: "talkbox" mode for files+directories
- user: core
- <source>
- *: "Numbers"
- </source>
- <dest>
- *: "Numuri"
- </dest>
- <voice>
- *: "numuri"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_SPELL
- desc: "talkbox" mode for files+directories
- user: core
- <source>
- *: "Spell"
- </source>
- <dest>
- *: "IzrunÄt"
- </dest>
- <voice>
- *: "izrunaat"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_DIR_HOVER
- desc: "talkbox" mode for directories + files
- user: core
- <source>
- *: ".talk Clip"
- </source>
- <dest>
- *: ".talk Klips"
- </dest>
- <voice>
- *: "talk klips"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MANAGE_MENU
- desc: in the main menu
- user: core
- <source>
- *: "Manage Settings"
- </source>
- <dest>
- *: "Rediģēt UzstÄdÄ«jumus"
- </dest>
- <voice>
- *: "redigjeet uzstaadiijumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CUSTOM_CFG
- desc: in setting_menu()
- user: core
- <source>
- *: "Browse .cfg Files"
- </source>
- <dest>
- *: "Aplūkot .cfg Failus"
- </dest>
- <voice>
- *: "apluukot konfiguraacijas failus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SETTINGS_LOADED
- desc: Feedback shown when a .cfg file is loaded
- user: core
- <source>
- *: "Settings Loaded"
- </source>
- <dest>
- *: "UzstÄdÄ«jumi IelÄdÄ“ti"
- </dest>
- <voice>
- *: "uzstaadiijumi ielaadeeti"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET
- desc: in system_settings_menu()
- user: core
- <source>
- *: "Reset Settings"
- </source>
- <dest>
- *: "Atgriezt Noklusējumu"
- </dest>
- <voice>
- *: "atgriezt nokluseetos uzstaadiijumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET_DONE_CLEAR
- desc: visual confirmation after settings reset
- user: core
- <source>
- *: "Cleared"
- </source>
- <dest>
- *: "Atgriezts Noklusējums"
- </dest>
- <voice>
- *: "atgriezti nokluseetie uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SAVE_SETTINGS
- desc: in system_settings_menu()
- user: core
- <source>
- *: "Save .cfg File"
- </source>
- <dest>
- *: "SaglabÄt .cfg Failu"
- </dest>
- <voice>
- *: "saglabaat konfiguraacijas failu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SETTINGS_SAVED
- desc: Feedback shown when a .cfg file is saved
- user: core
- <source>
- *: "Settings Saved"
- </source>
- <dest>
- *: "UzstÄdÄ«jumi SaglabÄti"
- </dest>
- <voice>
- *: "uzstaadiijumi saglabaati"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SAVE_THEME
- desc: save a theme file
- user: core
- <source>
- *: "Save Theme Settings"
- </source>
- <dest>
- *: "SaglabÄt TÄ“mas UzstÄdÄ«jumus"
- </dest>
- <voice>
- *: "saglabaat teemas uzstaadiijumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CUSTOM_THEME
- desc: in the main menu
- user: core
- <source>
- *: "Browse Theme Files"
- </source>
- <dest>
- *: "Aplūkot Tēmu Failus"
- </dest>
- <voice>
- *: "apluukot teemu failus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_SETTINGS
- desc: in the main menu
- user: core
- <source>
- *: none
- recording: "Recording Settings"
- </source>
- <dest>
- *: none
- recording: "Ieraksta UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: none
- recording: "ieraksta uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_MENU
- desc: fm menu title
- user: core
- <source>
- *: none
- radio: "FM Radio Menu"
- </source>
- <dest>
- *: none
- radio: "FM Radio Izvēlne"
- </dest>
- <voice>
- *: none
- radio: "ef em radio izveelne"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_NO_PRESETS
- desc: error when preset list is empty
- user: core
- <source>
- *: none
- radio: "No presets"
- </source>
- <dest>
- *: none
- radio: "Nav Staciju"
- </dest>
- <voice>
- *: none
- radio: "nav saglabaatu radiostaciju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_ADD_PRESET
- desc: in radio menu
- user: core
- <source>
- *: none
- radio: "Add Preset"
- </source>
- <dest>
- *: none
- radio: "Pievienot Staciju"
- </dest>
- <voice>
- *: none
- radio: "pievienot radiostaciju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_EDIT_PRESET
- desc: in radio screen
- user: core
- <source>
- *: none
- radio: "Edit Preset"
- </source>
- <dest>
- *: none
- radio: "Labot Staciju"
- </dest>
- <voice>
- *: none
- radio: "labot radiostaciju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_DELETE_PRESET
- desc: in radio screen
- user: core
- <source>
- *: none
- radio: "Remove Preset"
- </source>
- <dest>
- *: none
- radio: "Izdzēst Staciju"
- </dest>
- <voice>
- *: none
- radio: "izdzeest radiostaciju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_PRESET_SAVE_FAILED
- desc: in radio screen
- user: core
- <source>
- *: none
- radio: "Preset Save Failed"
- </source>
- <dest>
- *: none
- radio: "Staciju NeizdevÄs SaglabÄt"
- </dest>
- <voice>
- *: none
- radio: "radiostaciju neizdevaas saglabaat"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_NO_FREE_PRESETS
- desc: in radio screen
- user: core
- <source>
- *: none
- radio: "The Preset List is Full"
- </source>
- <dest>
- *: none
- radio: "Saraksts Ir Pilns"
- </dest>
- <voice>
- *: none
- radio: "saraksts ir pilns"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BUTTONBAR_MENU
- desc: in button bar
- user: core
- <source>
- *: none
- radio_screen_button_bar: "Menu"
- </source>
- <dest>
- *: none
- radio_screen_button_bar: "Izvēlne"
- </dest>
- <voice>
- *: none
- radio_screen_button_bar: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_BUTTONBAR_EXIT
- desc: in radio screen
- user: core
- <source>
- *: none
- radio_screen_button_bar: "Exit"
- </source>
- <dest>
- *: none
- radio_screen_button_bar: "Iziet"
- </dest>
- <voice>
- *: none
- radio_screen_button_bar: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_BUTTONBAR_ACTION
- desc: in radio screen
- user: core
- <source>
- *: none
- radio_screen_button_bar: "Action"
- </source>
- <dest>
- *: none
- radio_screen_button_bar: "Darbība"
- </dest>
- <voice>
- *: none
- radio_screen_button_bar: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PRESET
- desc: in button bar and radio screen / menu
- user: core
- <source>
- *: none
- radio: "Preset"
- </source>
- <dest>
- *: none
- radio: "Stacija"
- </dest>
- <voice>
- *: none
- radio: "radiostacija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_BUTTONBAR_ADD
- desc: in radio screen
- user: core
- <source>
- *: none
- radio_screen_button_bar: "Add"
- </source>
- <dest>
- *: none
- radio_screen_button_bar: "Pievienot"
- </dest>
- <voice>
- *: none
- radio_screen_button_bar: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_BUTTONBAR_RECORD
- desc: in radio screen
- user: core
- <source>
- *: none
- radio_screen_button_bar: "Record"
- </source>
- <dest>
- *: none
- radio_screen_button_bar: "Ierakstīt"
- </dest>
- <voice>
- *: none
- radio_screen_button_bar: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_MONO_MODE
- desc: in radio screen
- user: core
- <source>
- *: none
- radio: "Force Mono"
- </source>
- <dest>
- *: none
- radio: "Ieslēgt Mono"
- </dest>
- <voice>
- *: none
- radio: "iesleegt mono"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_FREEZE
- desc: splash screen during freeze in radio mode
- user: core
- <source>
- *: none
- radio: "Screen frozen!"
- </source>
- <dest>
- *: none
- radio: "EkrÄns Sastindzis!"
- </dest>
- <voice>
- *: none
- radio: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_SCAN_PRESETS
- desc: in radio menu
- user: core
- <source>
- *: none
- radio: "Auto-Scan Presets"
- </source>
- <dest>
- *: none
- radio: "Noskanēt Stacijas"
- </dest>
- <voice>
- *: none
- radio: "noskaneet radiostacijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_CLEAR_PRESETS
- desc: confirmation if presets can be cleared
- user: core
- <source>
- *: none
- radio: "Clear Current Presets?"
- </source>
- <dest>
- *: none
- radio: "IzdzÄ“st EsoÅ¡Äs Stacijas?"
- </dest>
- <voice>
- *: none
- radio: "vai izdzeest esoshaas radiostacijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_SCANNING
- desc: during auto scan
- user: core
- <source>
- *: none
- radio: "Scanning %d.%02d MHz"
- </source>
- <dest>
- *: none
- radio: "Skanē %d.%02d MHz"
- </dest>
- <voice>
- *: none
- radio: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_DEFAULT_PRESET_NAME
- desc: default preset name for auto scan mode
- user: core
- <source>
- *: none
- radio: "%d.%02d MHz"
- </source>
- <dest>
- *: none
- radio: "%d.%02d MHz"
- </dest>
- <voice>
- *: none
- radio: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_RADIO_SCAN_MODE
- desc: in radio screen / menu
- user: core
- <source>
- *: none
- radio: "Scan"
- </source>
- <dest>
- *: none
- radio: "Skanēt"
- </dest>
- <voice>
- *: none
- radio: "skaneet"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_PRESET_LOAD
- desc: load preset list in fm radio
- user: core
- <source>
- *: none
- radio: "Load Preset List"
- </source>
- <dest>
- *: none
- radio: "IelÄdÄ“t Stacijas"
- </dest>
- <voice>
- *: none
- radio: "ielaadeet radiostacijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_PRESET_SAVE
- desc: Save preset list in fm radio
- user: core
- <source>
- *: none
- radio: "Save Preset List"
- </source>
- <dest>
- *: none
- radio: "SaglabÄt Stacijas"
- </dest>
- <voice>
- *: none
- radio: "saglabaat radiostacijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_PRESET_CLEAR
- desc: clear preset list in fm radio
- user: core
- <source>
- *: none
- radio: "Clear Preset List"
- </source>
- <dest>
- *: none
- radio: "Izdzēst Stacijas"
- </dest>
- <voice>
- *: none
- radio: "izdzeest radiostacijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FMR
- desc: Used when you need to say Preset List, also voiced
- user: core
- <source>
- *: none
- radio: "Preset List"
- </source>
- <dest>
- *: none
- radio: "Staciju Saraksts"
- </dest>
- <voice>
- *: none
- radio: "radiostaciju saraksts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_FIRST_AUTOSCAN
- desc: When you run the radio without an fmr file in settings
- user: core
- <source>
- *: none
- radio: "No settings found. Autoscan?"
- </source>
- <dest>
- *: none
- radio: "Nav UzstÄdÄ«jumu. SkanÄ“t?"
- </dest>
- <voice>
- *: none
- radio: "nav uzstaadiijumu. vai skaneet"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_SAVE_CHANGES
- desc: deprecated
- user: core
- <source>
- *: none
- radio: ""
- </source>
- <dest>
- *: none
- radio: ""
- </dest>
- <voice>
- *: none
- radio: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_REGION
- desc: fm tuner region setting
- user: core
- <source>
- *: none
- radio: "Region"
- </source>
- <dest>
- *: none
- radio: "Reģions"
- </dest>
- <voice>
- *: none
- radio: "regjions"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_EUROPE
- desc: fm tuner region europe
- user: core
- <source>
- *: none
- radio: "Europe"
- </source>
- <dest>
- *: none
- radio: "Eiropa"
- </dest>
- <voice>
- *: none
- radio: "eiropa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_US
- desc: fm region us / canada
- user: core
- <source>
- *: none
- radio: "US / Canada"
- </source>
- <dest>
- *: none
- radio: "ASV / KanÄda"
- </dest>
- <voice>
- *: none
- radio: "asv un kanaada"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_JAPAN
- desc: fm region japan
- user: core
- <source>
- *: none
- radio: "Japan"
- </source>
- <dest>
- *: none
- radio: "JapÄna"
- </dest>
- <voice>
- *: none
- radio: "japaana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_KOREA
- desc: fm region korea
- user: core
- <source>
- *: none
- radio: "Korea"
- </source>
- <dest>
- *: none
- radio: "Koreja"
- </dest>
- <voice>
- *: none
- radio: "koreja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_FORMAT
- desc: audio format item in recording menu
- user: core
- <source>
- *: none
- recording: "Format"
- </source>
- <dest>
- *: none
- recording: "FormÄts"
- </dest>
- <voice>
- *: none
- recording: "formaats"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AFMT_MPA_L3
- desc: audio format description
- user: core
- <source>
- *: none
- recording: "MPEG Layer 3"
- </source>
- <dest>
- *: none
- recording: "MPEG Layer 3"
- </dest>
- <voice>
- *: none
- recording: "MPEG Layer 3"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AFMT_PCM_WAV
- desc: audio format description
- user: core
- <source>
- *: none
- recording: "PCM Wave"
- </source>
- <dest>
- *: none
- recording: "PCM Wave"
- </dest>
- <voice>
- *: none
- recording: "PCM Wave"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AFMT_WAVPACK
- desc: audio format description
- user: core
- <source>
- *: none
- recording_swcodec: "WavPack"
- </source>
- <dest>
- *: none
- recording_swcodec: "WavPack"
- </dest>
- <voice>
- *: none
- recording_swcodec: "WavPack"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AFMT_AIFF
- desc: audio format description
- user: core
- <source>
- *: none
- recording: "AIFF"
- </source>
- <dest>
- *: none
- recording: "AIFF"
- </dest>
- <voice>
- *: none
- recording: "AIFF"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ENCODER_SETTINGS
- desc: encoder settings
- user: core
- <source>
- *: none
- recording: "Encoder Settings"
- </source>
- <dest>
- *: none
- recording: "KodÄ“juma UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: none
- recording: "kodeejuma uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BITRATE
- desc: bits-kilobits per unit time
- user: core
- <source>
- *: none
- recording_swcodec: "Bitrate"
- </source>
- <dest>
- *: none
- recording_swcodec: "Bitreits"
- </dest>
- <voice>
- *: none
- recording_swcodec: "bitreits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NO_SETTINGS
- desc: when something has settings in a certain context
- user: core
- <source>
- *: none
- recording: "(No Settings)"
- </source>
- <dest>
- *: none
- recording: "(Nav UzstÄdÄ«jumu)"
- </dest>
- <voice>
- *: none
- recording: "nav ko uzstaadiit"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_QUALITY
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording_hwcodec: "Quality"
- </source>
- <dest>
- *: none
- recording_hwcodec: "KvalitÄte"
- </dest>
- <voice>
- *: none
- recording_hwcodec: "kvalitaate"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_FREQUENCY
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Frequency"
- </source>
- <dest>
- *: none
- recording: "Frekvence"
- </dest>
- <voice>
- *: none
- recording: "frekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SOURCE_FREQUENCY
- desc: when recording source frequency setting must follow source
- user: core
- <source>
- *: none
- recording: "(Same As Source)"
- </source>
- <dest>
- *: none
- recording: "(KÄ Avots)"
- </dest>
- <voice>
- *: none
- recording: "taads pats kaa avots"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_SOURCE
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Source"
- </source>
- <dest>
- *: none
- recording: "Avots"
- </dest>
- <voice>
- *: none
- recording: "avots"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_SRC_MIC
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Microphone"
- iriverh100,iriverh120,iriverh300: "Internal Microphone"
- </source>
- <dest>
- *: none
- recording: "Mikrofons"
- iriverh100,iriverh120,iriverh300: "Ievūvētais Mikrofons"
- </dest>
- <voice>
- *: none
- recording: "mikrofons"
- iriverh100,iriverh120,iriverh300: "iebuuveetais mikrofons"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_SRC_DIGITAL
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Digital"
- </source>
- <dest>
- *: none
- recording: "DigitÄls"
- </dest>
- <voice>
- *: none
- recording: "digitaals"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LINE_IN
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording,archosplayer: "Line In"
- </source>
- <dest>
- *: none
- recording,archosplayer: "LineÄrÄ Ieeja"
- </dest>
- <voice>
- *: none
- recording,archosplayer: "lineaaraa ieeja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_EDITABLE
- desc: Editable recordings setting
- user: core
- <source>
- *: none
- recording_hwcodec: "Independent Frames"
- </source>
- <dest>
- *: none
- recording_hwcodec: "Neatkarīgi Kadri"
- </dest>
- <voice>
- *: none
- recording_hwcodec: "neatkariigi kadri"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_TIMESPLIT
- desc: Record split menu
- user: core
- <source>
- *: none
- recording: "File Split Options"
- </source>
- <dest>
- *: none
- recording: "Failu Sadalīšanas Opcijas"
- </dest>
- <voice>
- *: none
- recording: "failu sadaliishanas opcijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPLIT_MEASURE
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "Split Measure"
- </source>
- <dest>
- *: none
- recording: "Sadalīšanas Kritērijs"
- </dest>
- <voice>
- *: none
- recording: "sadaliishanas kriteerijs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPLIT_TYPE
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "What to do when Splitting"
- </source>
- <dest>
- *: none
- recording: "Ko Darīt Pēc Sadalīšanas"
- </dest>
- <voice>
- *: none
- recording: "ko dariit peec sadaliishanas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_START_NEW_FILE
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "Start new file"
- </source>
- <dest>
- *: none
- recording: "SÄkt Jaunu Failu"
- </dest>
- <voice>
- *: none
- recording: "saakt jaunu failu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STOP_RECORDING
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "Stop recording"
- </source>
- <dest>
- *: none
- recording: "Beigt Ierakstu"
- </dest>
- <voice>
- *: none
- recording: "beigt ierakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPLIT_TIME
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "Split Time"
- </source>
- <dest>
- *: none
- recording: "Sadalīšanas Laiks"
- </dest>
- <voice>
- *: none
- recording: "sadaliishanas laiks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPLIT_SIZE
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "Split Filesize"
- </source>
- <dest>
- *: none
- recording: "Sadalīšanas Izmērs"
- </dest>
- <voice>
- *: none
- recording: "sadaliishanas izmeers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_PRERECORD_TIME
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Prerecord Time"
- </source>
- <dest>
- *: none
- recording: "Pirmsieraksta Laiks"
- </dest>
- <voice>
- *: none
- recording: "pirmsieraksta laiks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_DIRECTORY
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Directory"
- </source>
- <dest>
- *: none
- recording: "Mape"
- </dest>
- <voice>
- *: none
- recording: "mape"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SET_AS_REC_DIR
- desc: used in the onplay menu to set a recording dir
- user: core
- <source>
- *: none
- recording: "Set As Recording Directory"
- </source>
- <dest>
- *: none
- recording: "Uzlikt Par Ieraksta Mapi"
- </dest>
- <voice>
- *: none
- recording: "uzlikt par ieraksta mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CLEAR_REC_DIR
- desc:
- user: core
- <source>
- *: none
- recording: "Clear Recording Directory"
- </source>
- <dest>
- *: none
- recording: "PÄrstatÄ«t Ieraksta Mapi"
- </dest>
- <voice>
- *: none
- recording: "paarstatiit ieraksta mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REC_DIR_NOT_WRITABLE
- desc:
- user: core
- <source>
- *: none
- recording: "Can't write to recording directory"
- </source>
- <dest>
- *: none
- recording: "Nevar saglabÄt ieraksta mapÄ“"
- </dest>
- <voice>
- *: none
- recording: "nevar saglabaat ieraksta mapee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CLIP_LIGHT
- desc: in record settings menu.
- user: core
- <source>
- *: none
- recording: "Clipping Light"
- </source>
- <dest>
- *: none
- recording: "PÄrlÄ«meņa Gaisma"
- </dest>
- <voice>
- *: none
- recording: "paarliimenja gaisma"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MAIN_UNIT
- desc: in record settings menu.
- user: core
- <source>
- *: none
- remote: "Main Unit Only"
- </source>
- <dest>
- *: none
- remote: "Tikai Uz EkrÄna"
- </dest>
- <voice>
- *: none
- remote: "tikai uz ekraana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_UNIT
- desc: in record settings menu.
- user: core
- <source>
- *: none
- remote: "Remote Unit Only"
- </source>
- <dest>
- *: none
- remote: "Tikai Uz Pults"
- </dest>
- <voice>
- *: none
- remote: "tikai uz pults"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_MAIN
- desc: in record settings menu.
- user: core
- <source>
- *: none
- remote: "Main and Remote Unit"
- </source>
- <dest>
- *: none
- remote: "Uz EkrÄna Un Pults"
- </dest>
- <voice>
- *: none
- remote: "uz ekraana un pults"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_TRIGGER
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Trigger"
- </source>
- <dest>
- *: none
- recording: "Palaidējs"
- </dest>
- <voice>
- *: none
- recording: "ieraksta palaideejs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_TRIG_NOREARM
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Once"
- </source>
- <dest>
- *: none
- recording: "Vienreiz"
- </dest>
- <voice>
- *: none
- recording: "vienreiz"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_TRIGGER_TYPE
- desc: in recording trigger menu
- user: core
- <source>
- *: none
- recording: "Trigtype"
- </source>
- <dest>
- *: none
- recording: "Veids"
- </dest>
- <voice>
- *: none
- recording: "veids"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_TRIGGER_NEWFILESTP
- desc: trigger types
- user: core
- <source>
- *: none
- recording: "New file"
- </source>
- <dest>
- *: none
- recording: "Jauns Fails"
- </dest>
- <voice>
- *: none
- recording: "jauns fails"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_TRIGGER_STOP
- desc: trigger types
- user: core
- <source>
- *: none
- recording: "Stop"
- </source>
- <dest>
- *: none
- recording: "ApstÄties"
- </dest>
- <voice>
- *: none
- recording: "apstaaties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_START_THRESHOLD
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Start Above"
- </source>
- <dest>
- *: none
- recording: "SÄkt Virs"
- </dest>
- <voice>
- *: none
- recording: "saakt virs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MIN_DURATION
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "for at least"
- </source>
- <dest>
- *: none
- recording: "Pēc Vismaz"
- </dest>
- <voice>
- *: none
- recording: "peec vismaz"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_STOP_THRESHOLD
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Stop Below"
- </source>
- <dest>
- *: none
- recording: "ApstÄties Zem"
- </dest>
- <voice>
- *: none
- recording: "apstaaties zem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_STOP_GAP
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Presplit Gap"
- </source>
- <dest>
- *: none
- recording: "Pirmssadales Sprauga"
- </dest>
- <voice>
- *: none
- recording: "pirmssadales sprauga"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORD_PRERECORD
- desc: in recording and radio screen
- user: core
- <source>
- *: none
- recording: "Pre-Recording"
- </source>
- <dest>
- *: none
- recording: "Pirmsieraksts"
- </dest>
- <voice>
- *: none
- recording: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_AGC_SAFETY
- desc: AGC preset
- user: core
- <source>
- *: none
- agc: "Safety (clip)"
- </source>
- <dest>
- *: none
- agc: "Drošība (Skaļums)"
- </dest>
- <voice>
- *: none
- agc: "Droshiiba (skaljums)"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AGC_LIVE
- desc: AGC preset
- user: core
- <source>
- *: none
- agc: "Live (slow)"
- </source>
- <dest>
- *: none
- agc: "Koncerts (lēni)"
- </dest>
- <voice>
- *: none
- agc: "koncerts (leeni)"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AGC_DJSET
- desc: AGC preset
- user: core
- <source>
- *: none
- agc: "DJ-Set (slow)"
- </source>
- <dest>
- *: none
- agc: "Reps (lēni)"
- </dest>
- <voice>
- *: none
- agc: "reps (leeni)"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AGC_MEDIUM
- desc: AGC preset
- user: core
- <source>
- *: none
- agc: "Medium"
- </source>
- <dest>
- *: none
- agc: "Vidēji"
- </dest>
- <voice>
- *: none
- agc: "videeji"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AGC_VOICE
- desc: AGC preset
- user: core
- <source>
- *: none
- agc: "Voice (fast)"
- </source>
- <dest>
- *: none
- agc: "Balss (Ätri)"
- </dest>
- <voice>
- *: none
- agc: "balss (aatri)"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_LCD_OFF
- desc: Remote lcd off splash in recording screen
- user: core
- <source>
- *: none
- remote: "Remote Display OFF"
- </source>
- <dest>
- *: none
- remote: "Pults EkrÄns IzslÄ“gts"
- </dest>
- <voice>
- *: none
- remote: "pults ekraans izsleegts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_LCD_ON
- desc: Remote lcd off splash in recording screen
- user: core
- <source>
- *: none
- remote: "(Vol- : Re-enable)"
- </source>
- <dest>
- *: none
- remote: "(Skaļums- : Ieslēgt)"
- </dest>
- <voice>
- *: none
- remote: "spiest skaljumu lai iesleegtu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CREATE_PLAYLIST
- desc: Menu option for creating a playlist
- user: core
- <source>
- *: "Create Playlist"
- </source>
- <dest>
- *: "Izveidot Sarakstu"
- </dest>
- <voice>
- *: "izveidot sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLISTVIEWER_SETTINGS
- desc: title for the playlist viewer settings menus
- user: core
- <source>
- *: "Playlist Viewer Settings"
- </source>
- <dest>
- *: "Sarakstu SkatÄ«tÄja UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "sarakstu skatiitaaja uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VIEW_DYNAMIC_PLAYLIST
- desc: in playlist menu.
- user: core
- <source>
- *: "View Current Playlist"
- </source>
- <dest>
- *: "Aplūkot Patreizējo Sarakstu"
- </dest>
- <voice>
- *: "apluukot patreizeejo sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MOVE
- desc: The verb/action Move
- user: core
- <source>
- *: "Move"
- </source>
- <dest>
- *: "PÄrvietot"
- </dest>
- <voice>
- *: "paarvietot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHOW_INDICES
- desc: in playlist viewer menu
- user: core
- <source>
- *: "Show Indices"
- </source>
- <dest>
- *: "RÄdÄ«t Indeksus"
- </dest>
- <voice>
- *: "raadiit indeksus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TRACK_DISPLAY
- desc: in playlist viewer on+play menu
- user: core
- <source>
- *: "Track Display"
- </source>
- <dest>
- *: "ParÄdÄ«t Dziesmu"
- </dest>
- <voice>
- *: "paraadiit dziesmu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISPLAY_TRACK_NAME_ONLY
- desc: track display options
- user: core
- <source>
- *: "Track Name Only"
- </source>
- <dest>
- *: "Tikai Nosaukumu"
- </dest>
- <voice>
- *: "tikai nosaukumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOVE
- desc: in playlist viewer on+play menu
- user: core
- <source>
- *: "Remove"
- </source>
- <dest>
- *: "AizvÄkt"
- </dest>
- <voice>
- *: "aizvaakt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SAVE_DYNAMIC_PLAYLIST
- desc: in playlist menu.
- user: core
- <source>
- *: "Save Current Playlist"
- </source>
- <dest>
- *: "SaglabÄt PatreizÄ“jo Sarakstu"
- </dest>
- <voice>
- *: "saglabaat patreizeejo sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_SAVE_COUNT
- desc: splash number of tracks saved
- user: core
- <source>
- *: "Saved %d tracks (%s)"
- </source>
- <dest>
- *: "SaglabÄtas %d dziesmas (%s)"
- </dest>
- <voice>
- *: "saglabaatas dziesmas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CATALOG
- desc: in main menu and onplay menu
- user: core
- <source>
- *: "Playlist Catalogue"
- </source>
- <dest>
- *: "Sarakstu Katalogs"
- </dest>
- <voice>
- *: "sarakstu katalogs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECURSE_DIRECTORY
- desc: In playlist menu
- user: core
- <source>
- *: "Recursively Insert Directories"
- </source>
- <dest>
- *: "Ievietot Mapes Ar Apakšmapēm"
- </dest>
- <voice>
- *: "ievietot mapes ar apakshmapeem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECURSE_DIRECTORY_QUESTION
- desc: Asked from onplay screen
- user: core
- <source>
- *: "Recursively?"
- </source>
- <dest>
- *: "Ar Apakšmapēm?"
- </dest>
- <voice>
- *: "vai ar apakshmapeem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WARN_ERASEDYNPLAYLIST_MENU
- desc: in playlist options menu, option to warn when erasing dynamic playlist
- user: core
- <source>
- *: "Warn When Erasing Dynamic Playlist"
- </source>
- <dest>
- *: "BrÄ«dinÄt Dzēšot Dinamisku sarakstu"
- </dest>
- <voice>
- *: "briidinaat dzeeshot dinamisku sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WARN_ERASEDYNPLAYLIST_PROMPT
- desc: prompt shown when about to erase a modified dynamic playlist
- user: core
- <source>
- *: "Erase dynamic playlist?"
- </source>
- <dest>
- *: "Izdzēst Dinamisku Sarakstu?"
- </dest>
- <voice>
- *: "vai izdzeest dinamisku sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHUTDOWN
- desc: in main menu
- user: core
- <source>
- *: none
- soft_shutdown: "Shut down"
- </source>
- <dest>
- *: none
- soft_shutdown: "Izslēgt"
- </dest>
- <voice>
- *: none
- soft_shutdown: "izsleegt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ROCKBOX_INFO
- desc: displayed topmost on the info screen and in the info menu
- user: core
- <source>
- *: "Rockbox Info"
- </source>
- <dest>
- *: "Par Rockbox"
- </dest>
- <voice>
- *: "par rockbox"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BUFFER_STAT
- desc: the buffer size, %d MB %d fraction of MB
- user: core
- <source>
- *: "Buffer:"
- archosplayer: "Buf:"
- </source>
- <dest>
- *: "Buferis:"
- archosplayer: "Buf:"
- </dest>
- <voice>
- *: "bufera izmeers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_TIME
- desc: battery level in % and estimated time remaining
- user: core
- <source>
- *: "Battery: %d%% %dh %dm"
- archosplayer,archosrecorder,archosfmrecorder,archosrecorderv2,archosondio*,iriverifp7xx: "%d%% %dh %dm"
- iriverh10,ipodmini1g,ipodmini2g: "Batt: %d%% %dh %dm"
- </source>
- <dest>
- *: "Baterija: %d%% %ds %dm"
- archosplayer,archosrecorder,archosfmrecorder,archosrecorderv2,archosondio*,iriverifp7xx: "%d%% %ds %dm"
- iriverh10,ipodmini1g,ipodmini2g: "Bat: %d%% %ds %dm"
- </dest>
- <voice>
- *: "baterijas liimenis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISK_SIZE_INFO
- desc: disk size info
- user: core
- <source>
- *: "Disk:"
- </source>
- <dest>
- *: "Atmiņa:"
- </dest>
- <voice>
- *: "atminjas izmeers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISK_FREE_INFO
- desc: disk size info
- user: core
- <source>
- *: "Free:"
- </source>
- <dest>
- *: "Brīvs:"
- </dest>
- <voice>
- *: "briivaa vieta:"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISK_NAME_INTERNAL
- desc: in info menu; name for internal disk with multivolume (keep short!)
- user: core
- <source>
- *: none
- multivolume: "Int:"
- </source>
- <dest>
- *: none
- multivolume: "IeÄ·Å¡:"
- </dest>
- <voice>
- *: none
- multivolume: "ieksheejais"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISK_NAME_MMC
- desc: in info menu; name for external disk with multivolume (Ondio; keep short!)
- user: core
- <source>
- *: none
- multivolume: "HD1"
- sansae200*,sansac200*,sansafuze*,sansaclipplus: "mSD:"
- archosondio*: "MMC:"
- </source>
- <dest>
- *: none
- multivolume: "HD1"
- sansae200*,sansac200*,sansafuze*,sansaclipplus: "MSD:"
- archosondio*: "MMC:"
- </dest>
- <voice>
- *: none
- multivolume: "haa dee viens"
- sansae200*,sansac200*,sansafuze*: "mikro es dee"
- archosondio*: "em em cee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VERSION
- desc: in the Rockbox Info screen
- user: core
- <source>
- *: "Version"
- </source>
- <dest>
- *: "Versija"
- </dest>
- <voice>
- *: "versija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RUNNING_TIME
- desc: in run time screen
- user: core
- <source>
- *: "Running Time"
- </source>
- <dest>
- *: "Ieslēgts"
- </dest>
- <voice>
- *: "iesleegts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOP_TIME
- desc: in run time screen
- user: core
- <source>
- *: "Top Time"
- </source>
- <dest>
- *: "IlgÄkais"
- </dest>
- <voice>
- *: "ilgaakais"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CLEAR_TIME
- desc: in run time screen
- user: core
- <source>
- *: "Clear Time?"
- </source>
- <dest>
- *: "Izdzēst Laiku?"
- </dest>
- <voice>
- *: "vai izdzeest laiku"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DEBUG
- desc: in the info menu
- user: core
- <source>
- *: "Debug (Keep Out!)"
- </source>
- <dest>
- *: "Kļūdas (Neaiztiec!)"
- </dest>
- <voice>
- *: "kljuudas neaiztiec"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST
- desc: Used when you need to say playlist, also voiced
- user: core
- <source>
- *: "Playlist"
- </source>
- <dest>
- *: "Saraksts"
- </dest>
- <voice>
- *: "saraksts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INSERT
- desc: in onplay menu. insert a track/playlist into dynamic playlist.
- user: core
- <source>
- *: "Insert"
- </source>
- <dest>
- *: "Ievietot"
- </dest>
- <voice>
- *: "ievietot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INSERT_FIRST
- desc: in onplay menu. insert a track/playlist into dynamic playlist.
- user: core
- <source>
- *: "Insert Next"
- </source>
- <dest>
- *: "Ievietot NÄkamo"
- </dest>
- <voice>
- *: "ievietot Naakamo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INSERT_LAST
- desc: in onplay menu. append a track/playlist into dynamic playlist.
- user: core
- <source>
- *: "Insert Last"
- </source>
- <dest>
- *: "Ievietot Pēdējo"
- </dest>
- <voice>
- *: "ievietot peedeejo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INSERT_SHUFFLED
- desc: in onplay menu. insert a track/playlist randomly into dynamic playlist
- user: core
- <source>
- *: "Insert Shuffled"
- </source>
- <dest>
- *: "Ievietot Sajaukti"
- </dest>
- <voice>
- *: "ievietot sajaukti"
- </voice>
-</phrase>
-<phrase>
- id: LANG_QUEUE
- desc: The verb/action Queue
- user: core
- <source>
- *: "Queue"
- </source>
- <dest>
- *: "Rinda"
- </dest>
- <voice>
- *: "rinda"
- </voice>
-</phrase>
-<phrase>
- id: LANG_QUEUE_FIRST
- desc: in onplay menu. queue a track/playlist into dynamic playlist.
- user: core
- <source>
- *: "Queue Next"
- </source>
- <dest>
- *: "RindÄ NÄkamo"
- </dest>
- <voice>
- *: "rindaa naakamo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_QUEUE_LAST
- desc: in onplay menu. queue a track/playlist at end of playlist.
- user: core
- <source>
- *: "Queue Last"
- </source>
- <dest>
- *: "RindÄ PÄ“dÄ“jo"
- </dest>
- <voice>
- *: "rindÄ peedeejo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_QUEUE_SHUFFLED
- desc: in onplay menu. queue a track/playlist randomly into dynamic playlist
- user: core
- <source>
- *: "Queue Shuffled"
- </source>
- <dest>
- *: "RindÄ Sajaukti"
- </dest>
- <voice>
- *: "rindaa sajaukti"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REPLACE
- desc: in onplay menu. Replace the current playlist with a new one.
- user: core
- <source>
- *: "Play Next"
- </source>
- <dest>
- *: "Atskaņot NÄkamo"
- </dest>
- <voice>
- *: "atskanjot naakamo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_INSERT_COUNT
- desc: splash number of tracks inserted
- user: core
- <source>
- *: "Inserted %d tracks (%s)"
- </source>
- <dest>
- *: "Ievietotas %d dziesmas (%s)"
- </dest>
- <voice>
- *: "ievietotas dziesmas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_QUEUE_COUNT
- desc: splash number of tracks queued
- user: core
- <source>
- *: "Queued %d tracks (%s)"
- </source>
- <dest>
- *: "RindÄ %d dziesmas (%s)"
- </dest>
- <voice>
- *: "ievietotas rindaa dziesmas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VIEW
- desc: in on+play menu
- user: core
- <source>
- *: "View"
- </source>
- <dest>
- *: "Aplūkot"
- </dest>
- <voice>
- *: "apluukot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SEARCH_IN_PLAYLIST
- desc: in playlist menu.
- user: core
- <source>
- *: "Search In Playlist"
- </source>
- <dest>
- *: "MeklÄ“t SarakstÄ"
- </dest>
- <voice>
- *: "mekleet sarakstaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_SEARCH_MSG
- desc: splash number of tracks inserted
- user: core
- <source>
- *: "Searching... %d found (%s)"
- </source>
- <dest>
- *: "Meklē... %d atrastas (%s)"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHUFFLE_PLAYLIST
- desc: in playlist menu, reshuffles the order in which songs are played
- user: core
- <source>
- *: "Reshuffle"
- </source>
- <dest>
- *: "PÄrkÄrtot"
- </dest>
- <voice>
- *: "paarkaartot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CATALOG_VIEW
- desc: in onplay playlist catalogue submenu
- user: core
- <source>
- *: "View Catalogue"
- </source>
- <dest>
- *: "Aplūkot Katalogu"
- </dest>
- <voice>
- *: "apluukot katalogu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CATALOG_ADD_TO
- desc: in onplay playlist catalogue submenu
- user: core
- <source>
- *: "Add to Playlist"
- </source>
- <dest>
- *: "Pievienot Sarakstam"
- </dest>
- <voice>
- *: "pievienot sarakstam"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CATALOG_ADD_TO_NEW
- desc: in onplay playlist catalogue submenu
- user: core
- <source>
- *: "Add to New Playlist"
- </source>
- <dest>
- *: "Pievienot Jaunam Sarakstam"
- </dest>
- <voice>
- *: "pievienot jaunam sarakstam"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CATALOG_NO_DIRECTORY
- desc: error message when playlist catalogue directory doesn't exist
- user: core
- <source>
- *: "%s doesn't exist"
- </source>
- <dest>
- *: "%s nepastÄv"
- </dest>
- <voice>
- *: "saraksta mape nepastaav"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CATALOG_NO_PLAYLISTS
- desc: error message when no playlists for playlist catalogue
- user: core
- <source>
- *: "No Playlists"
- </source>
- <dest>
- *: "Nav Sarakstu"
- </dest>
- <voice>
- *: "nav sarakstu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_MENU
- desc: Text on main menu to get to bookmark commands
- user: core
- <source>
- *: "Bookmarks"
- </source>
- <dest>
- *: "GrÄmatzÄ«mes"
- </dest>
- <voice>
- *: "graamatziimes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_MENU_CREATE
- desc: Used off of the bookmark menu to create a bookmark
- user: core
- <source>
- *: "Create Bookmark"
- </source>
- <dest>
- *: "Izveidot GrÄmatzÄ«mi"
- </dest>
- <voice>
- *: "izveidot graamatziimi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_MENU_LIST
- desc: Used off of the bookmark menu to list available bookmarks for the currently playing directory or M3U
- user: core
- <source>
- *: "List Bookmarks"
- </source>
- <dest>
- *: "SakÄrtot GrÄmatzÄ«mes"
- </dest>
- <voice>
- *: "sakaartot graamatziimes"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ONPLAY_MENU_TITLE
- desc: title for the onplay menus
- user: core
- <source>
- *: "Context Menu"
- </source>
- <dest>
- *: "Izvēlne"
- </dest>
- <voice>
- *: "izveelne"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MENU_SET_RATING
- desc: Set the rating of a file in the wps context menu
- user: core
- <source>
- *: "Set Song Rating"
- </source>
- <dest>
- *: "Uzlikt Vērtējumu"
- </dest>
- <voice>
- *: "uzlikt veerteejumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BROWSE_CUESHEET
- desc:
- user: core
- <source>
- *: "Browse Cuesheet"
- </source>
- <dest>
- *: "Aplūkot cue"
- </dest>
- <voice>
- *: "apluukot cue"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MENU_SHOW_ID3_INFO
- desc: Menu option to start tag viewer
- user: core
- <source>
- *: "Show Track Info"
- </source>
- <dest>
- *: "Dziesmas Info"
- </dest>
- <voice>
- *: "paraadiit dziesmas info"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_TITLE
- desc: in tag viewer
- user: core
- <source>
- *: "Title"
- </source>
- <dest>
- *: "Nosaukums"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_ARTIST
- desc: in tag viewer
- user: core
- <source>
- *: "Artist"
- </source>
- <dest>
- *: "IzpildÄ«tÄjs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_ALBUM
- desc: in tag viewer
- user: core
- <source>
- *: "Album"
- </source>
- <dest>
- *: "Albūms"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_TRACKNUM
- desc: in tag viewer
- user: core
- <source>
- *: "Tracknum"
- </source>
- <dest>
- *: "Numurs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_GENRE
- desc: in tag viewer
- user: core
- <source>
- *: "Genre"
- </source>
- <dest>
- *: "Žanrs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_YEAR
- desc: in tag viewer
- user: core
- <source>
- *: "Year"
- </source>
- <dest>
- *: "Gads"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_LENGTH
- desc: in tag viewer
- user: core
- <source>
- *: "Length"
- </source>
- <dest>
- *: "Garums"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_PLAYLIST
- desc: in tag viewer
- user: core
- <source>
- *: "Playlist"
- </source>
- <dest>
- *: "Saraksts"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_BITRATE
- desc: in tag viewer
- user: core
- <source>
- *: "Bitrate"
- </source>
- <dest>
- *: "Bitreits"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_ALBUMARTIST
- desc: in tag viewer
- user: core
- <source>
- *: "Album Artist"
- </source>
- <dest>
- *: "AlbÅ«ma IzpildÄ«tÄjs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_DISCNUM
- desc: in tag viewer
- user: core
- <source>
- *: "Discnum"
- </source>
- <dest>
- *: "Diska Numurs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_COMMENT
- desc: in tag viewer
- user: core
- <source>
- *: "Comment"
- </source>
- <dest>
- *: "KomentÄrs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_VBR
- desc: in browse_id3
- user: core
- <source>
- *: " (VBR)"
- </source>
- <dest>
- *: " (MBR)"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_FREQUENCY
- desc: in tag viewer
- user: core
- <source>
- *: "Frequency"
- </source>
- <dest>
- *: "Frekvence"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_TRACK_GAIN
- desc: in tag viewer
- user: core
- <source>
- *: "Track Gain"
- </source>
- <dest>
- *: "Dziesmas Skaļums"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_ALBUM_GAIN
- desc: in tag viewer
- user: core
- <source>
- *: "Album Gain"
- </source>
- <dest>
- *: "Albūma Skaļums"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_PATH
- desc: in tag viewer
- user: core
- <source>
- *: "Path"
- </source>
- <dest>
- *: "Ceļš"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_NO_INFO
- desc: in tag viewer
- user: core
- <source>
- *: "<No Info>"
- </source>
- <dest>
- *: "<Nav InformÄcijas>"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_RENAME
- desc: The verb/action Rename
- user: core
- <source>
- *: "Rename"
- </source>
- <dest>
- *: "PÄrsaukt"
- </dest>
- <voice>
- *: "paarsaukt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CUT
- desc: The verb/action Cut
- user: core
- <source>
- *: "Cut"
- </source>
- <dest>
- *: "Izgriezt"
- </dest>
- <voice>
- *: "izgriezt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COPY
- desc: The verb/action Copy
- user: core
- <source>
- *: "Copy"
- </source>
- <dest>
- *: "Kopēt"
- </dest>
- <voice>
- *: "kopeet"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PASTE
- desc: The verb/action Paste
- user: core
- <source>
- *: "Paste"
- </source>
- <dest>
- *: "Ielīmēt"
- </dest>
- <voice>
- *: "ieliimeet"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REALLY_OVERWRITE
- desc: The verb/action Paste
- user: core
- <source>
- *: "File/directory exists. Overwrite?"
- </source>
- <dest>
- *: "Fails/mape jau ir. PÄrrakstÄ«t?"
- </dest>
- <voice>
- *: "fails vai mape jau ir. vai paarrakstiit"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DELETE
- desc: The verb/action Delete
- user: core
- <source>
- *: "Delete"
- </source>
- <dest>
- *: "Izdzēst"
- </dest>
- <voice>
- *: "izdzeest"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DELETE_DIR
- desc: in on+play menu
- user: core
- <source>
- *: "Delete Directory"
- </source>
- <dest>
- *: "Izdzēst Mapi"
- </dest>
- <voice>
- *: "izdzeest mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REALLY_DELETE
- desc: Really Delete?
- user: core
- <source>
- *: "Delete?"
- </source>
- <dest>
- *: "Izdzēst?"
- </dest>
- <voice>
- *: "vai tieshaam izdzeest"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COPYING
- desc:
- user: core
- <source>
- *: "Copying..."
- </source>
- <dest>
- *: "Kopē..."
- </dest>
- <voice>
- *: "kopee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DELETING
- desc:
- user: core
- <source>
- *: "Deleting..."
- </source>
- <dest>
- *: "Izdzēš..."
- </dest>
- <voice>
- *: "izdzeesh"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MOVING
- desc:
- user: core
- <source>
- *: "Moving..."
- </source>
- <dest>
- *: "PÄrvieto..."
- </dest>
- <voice>
- *: "paarvieto"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DELETED
- desc: A file has beed deleted
- user: core
- <source>
- *: "Deleted"
- </source>
- <dest>
- *: "Izdzēsts"
- </dest>
- <voice>
- *: "izdzeests"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SET_AS_BACKDROP
- desc: text for onplay menu entry
- user: core
- <source>
- *: none
- lcd_non-mono: "Set As Backdrop"
- </source>
- <dest>
- *: none
- lcd_non-mono: "Uzlikt KÄ Fonu"
- </dest>
- <voice>
- *: none
- lcd_non-mono: "uzlikt kaa fonu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKDROP_LOADED
- desc: deprecated
- user: core
- <source>
- *: none
- lcd_non-mono: ""
- </source>
- <dest>
- *: none
- lcd_non-mono: ""
- </dest>
- <voice>
- *: none
- lcd_non-mono: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_BACKDROP_FAILED
- desc: deprecated
- user: core
- <source>
- *: none
- lcd_non-mono: ""
- </source>
- <dest>
- *: none
- lcd_non-mono: ""
- </dest>
- <voice>
- *: none
- lcd_non-mono: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_ONPLAY_OPEN_WITH
- desc: Onplay open with
- user: core
- <source>
- *: "Open With..."
- </source>
- <dest>
- *: "Atvērt Ar..."
- </dest>
- <voice>
- *: "atveert ar"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CREATE_DIR
- desc: in main menu
- user: core
- <source>
- *: "Create Directory"
- </source>
- <dest>
- *: "Izveidot Mapi"
- </dest>
- <voice>
- *: "izveidot mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PROPERTIES
- desc: browser file/dir properties
- user: core
- <source>
- *: "Properties"
- </source>
- <dest>
- *: "Parametri"
- </dest>
- <voice>
- *: "parametri"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ADD_TO_FAVES
- desc:
- user: core
- <source>
- *: "Add to Shortcuts"
- </source>
- <dest>
- *: "Pievienot Saīsnēm"
- </dest>
- <voice>
- *: "pievienot saiisneem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PITCH
- desc: "pitch" in the pitch screen
- user: core
- <source>
- *: none
- pitchscreen: "Pitch"
- </source>
- <dest>
- *: none
- pitchscreen: "Ä€trums"
- </dest>
- <voice>
- *: none
- pitchscreen: "aatrums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PITCH_UP
- desc: in wps
- user: core
- <source>
- *: none
- pitchscreen: "Pitch Up"
- </source>
- <dest>
- *: none
- pitchscreen: "PaaugstinÄt"
- </dest>
- <voice>
- *: none
- pitchscreen: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PITCH_DOWN
- desc: in wps
- user: core
- <source>
- *: none
- pitchscreen: "Pitch Down"
- </source>
- <dest>
- *: none
- pitchscreen: "PazeminÄt"
- </dest>
- <voice>
- *: none
- pitchscreen: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PITCH_UP_SEMITONE
- desc: in wps
- user: core
- <source>
- *: none
- pitchscreen: "Semitone Up"
- </source>
- <dest>
- *: none
- pitchscreen: "Pustoni Uz Augšu"
- </dest>
- <voice>
- *: none
- pitchscreen: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PITCH_DOWN_SEMITONE
- desc: in wps
- user: core
- <source>
- *: none
- pitchscreen: "Semitone Down"
- </source>
- <dest>
- *: none
- pitchscreen: "Pustoni Uz Leju"
- </dest>
- <voice>
- *: none
- pitchscreen: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_BUFFER_FULL
- desc: in playlist.indices() when playlist is full
- user: core
- <source>
- *: "Playlist Buffer Full"
- </source>
- <dest>
- *: "Sarakstu Buferis Pilns"
- </dest>
- <voice>
- *: "sarakstu buferis pilns"
- </voice>
-</phrase>
-<phrase>
- id: LANG_END_PLAYLIST
- desc: when playlist has finished
- user: core
- <source>
- *: "End of Song List"
- archosplayer: "End of List"
- </source>
- <dest>
- *: "Dziesmu Saraksta Beigas"
- archosplayer: "Saraksta Beigas"
- </dest>
- <voice>
- *: "saraksta beigas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CREATING
- desc: Screen feedback during playlist creation
- user: core
- <source>
- *: "Creating"
- </source>
- <dest>
- *: "Veido"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_NOTHING_TO_RESUME
- desc: Error message displayed when resume button pressed but no playlist
- user: core
- <source>
- *: "Nothing to resume"
- </source>
- <dest>
- *: "Nav Ko AtsÄkt"
- </dest>
- <voice>
- *: "nav ko atsaakt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR
- desc: Playlist error
- user: core
- <source>
- *: "Error updating playlist control file"
- </source>
- <dest>
- *: "Kļūda Atjaunojot Saraksta Kontroles Failu"
- </dest>
- <voice>
- *: "kljuuda izveidojot saraksta kontroles failu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_ACCESS_ERROR
- desc: Playlist error
- user: core
- <source>
- *: "Error accessing playlist file"
- </source>
- <dest>
- *: "Kļūda Atverot Saraksta Failu"
- </dest>
- <voice>
- *: "kljuuda atverot saraksta failu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR
- desc: Playlist error
- user: core
- <source>
- *: "Error accessing playlist control file"
- </source>
- <dest>
- *: "Kļūda Atverot Saraksta Kontroles Failu"
- </dest>
- <voice>
- *: "kljuuda atverot saraksta kontroles failu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR
- desc: Playlist error
- user: core
- <source>
- *: "Error accessing directory"
- </source>
- <dest>
- *: "Kļūda Atverot Mapi"
- </dest>
- <voice>
- *: "kljuuda atverot mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYLIST_CONTROL_INVALID
- desc: Playlist resume error
- user: core
- <source>
- *: "Playlist control file is invalid"
- </source>
- <dest>
- *: "Saraksta Kontroles Fails Nederīgs"
- </dest>
- <voice>
- *: "saraksta kontroles fails ir nederiigs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PAUSE
- desc: in wps and recording trigger menu
- user: core
- <source>
- *: "Pause"
- </source>
- <dest>
- *: "Pauze"
- </dest>
- <voice>
- *: "pauze"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MODE
- desc: in wps F2 pressed and radio screen
- user: core
- <source>
- *: "Mode:"
- </source>
- <dest>
- *: "Režīms:"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_TIME
- desc: Used on the bookmark select window to label elapsed time
- user: core
- <source>
- *: "Time"
- </source>
- <dest>
- *: "Laiks"
- </dest>
- <voice>
- *: "laiks"
- </voice>
-</phrase>
-/* TODO: cleanup LANG_USB_CHARGING unless HAVE_USB_CHARGING_ENABLE defined,
- * the selector should probably be usb_charging_enable_enable as well. */
-<phrase>
- id: LANG_USB_CHARGING
- desc: in Battery menu
- user: core
- <source>
- *: none
- usb_charging_enable: "Charge During USB Connection"
- </source>
- <dest>
- *: none
- usb_charging_enable: "LÄdÄ“t ar USB"
- </dest>
- <voice>
- *: none
- usb_charging_enable: "laadeet ar uuesbee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KEYLOCK_ON
- desc: displayed when key lock is on
- user: core
- <source>
- *: "Buttons Locked"
- </source>
- <dest>
- *: "Pogas Nobloķētas"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_KEYLOCK_OFF
- desc: displayed when key lock is turned off
- user: core
- <source>
- *: "Buttons Unlocked"
- </source>
- <dest>
- *: "Pogas Atbloķētas"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_TIME
- desc: Display of recorded time
- user: core
- <source>
- *: none
- recording: "Time:"
- </source>
- <dest>
- *: none
- recording: "Laiks:"
- </dest>
- <voice>
- *: none
- recording: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_DISK_FULL
- desc: in recording screen
- user: core
- <source>
- *: none
- recording: "The disk is full. Press OFF to continue."
- iriverh100,iriverh120,iriverh300: "The disk is full. Press STOP to continue."
- iaudiom5,iaudiox5: "The disk is full. Press POWER to continue."
- sansae200*,sansac200*,vibe500: "The disk is full. Press PREV to continue."
- </source>
- <dest>
- *: none
- recording: "Atmiņa pilna. Spied OFF lai turpinÄtu."
- iriverh100,iriverh120,iriverh300: "Atmiņa pilna. Spied STOP lai turpinÄtu."
- iaudiom5,iaudiox5: "Atmiņa pilna. Spied POWER lai turpinÄtu."
- sansae200*,sansac200*,vibe500: "Atmiņa pilna. Spied PREV lai turpinÄtu."
- </dest>
- <voice>
- *: none
- recording,iriverh100,iriverh120,iriverh300,iaudiom5,iaudiox5,sansae200*,sansac200*: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_DB_INF
- desc: -inf db for values below measurement
- user: core
- <source>
- *: none
- recording: "-inf"
- </source>
- <dest>
- *: none
- recording: "-neg"
- </dest>
- <voice>
- *: none
- recording: "miinus bezgaliiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CONFIRM_SHUTDOWN
- desc: in shutdown screen
- user: core
- <source>
- *: none
- soft_shutdown: "Press OFF to shut down"
- </source>
- <dest>
- *: none
- soft_shutdown: "Spied OFF lai izslēgtu"
- </dest>
- <voice>
- *: none
- soft_shutdown: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOVE_MMC
- desc: before acknowledging usb in case an MMC is inserted (Ondio)
- user: core
- <source>
- *: none
- archosondio*: "Please remove inserted MMC"
- </source>
- <dest>
- *: none
- archosondio*: "Lūdzu izņemiet ievietoto MMC"
- </dest>
- <voice>
- *: none
- archosondio*: "luudzu iznjemiet atminjas karti"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOT_CHANGED
- desc: File browser discovered the boot file was changed
- user: core
- <source>
- *: "Boot changed"
- </source>
- <dest>
- *: "Fails Izmainīts"
- </dest>
- <voice>
- *: "fails izmainiits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REBOOT_NOW
- desc: Do you want to reboot?
- user: core
- <source>
- *: "Reboot now?"
- </source>
- <dest>
- *: "PÄrstartÄ“t tagad?"
- </dest>
- <voice>
- *: "vai paarstarteet tagad"
- </voice>
-</phrase>
-<phrase>
- id: LANG_OFF_ABORT
- desc: Used on archosrecorder models
- user: core
- <source>
- *: "OFF to abort"
- archosplayer,iriverh100,iriverh120,iriverh300: "STOP to abort"
- ipod*: "PLAY/PAUSE to abort"
- iaudiox5,iaudiom5: "Long PLAY to abort"
- iriverh10,iriverh10_5gb,sansae200*,sansac200*,vibe500: "PREV to abort"
- gigabeats: "BACK to abort"
- gigabeatfx: "POWER to abort"
- </source>
- <dest>
- *: "OFF lai pÄrtrauktu"
- archosplayer,iriverh100,iriverh120,iriverh300: "STOP lai pÄrtrauktu"
- ipod*: "PLAY/PAUSE lai pÄrtrauktu"
- iaudiox5,iaudiom5: "Long PLAY lai pÄrtrauktu"
- iriverh10,iriverh10_5gb,sansae200*,sansac200*,vibe500: "PREV lai pÄrtrauktu"
- gigabeats: "BACK lai pÄrtrauktu"
- gigabeatfx: "POWER lai pÄrtrauktu"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_NO_FILES
- desc: in settings_menu
- user: core
- <source>
- *: "No files"
- </source>
- <dest>
- *: "Nav Failu"
- </dest>
- <voice>
- *: "nav failu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KEYBOARD_LOADED
- desc: shown when a keyboard has been loaded from the dir browser
- user: core
- <source>
- *: "New Keyboard"
- </source>
- <dest>
- *: "Jauna Klaviatūra"
- </dest>
- <voice>
- *: "jauna klaviatuura"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_CANT_OPEN
- desc: Plugin open error message
- user: core
- <source>
- *: "Can't open %s"
- </source>
- <dest>
- *: "Nevar atvērt %s"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_READ_FAILED
- desc: There was an error reading a file
- user: core
- <source>
- *: "Failed reading %s"
- </source>
- <dest>
- *: "NeizdevÄs nolasÄ«t %s"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_WRONG_MODEL
- desc: The plugin is not compatible with the archos model trying to run it
- user: core
- <source>
- *: "Incompatible model"
- </source>
- <dest>
- *: "Nesaderīgs modelis"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_WRONG_VERSION
- desc: The plugin is not compatible with the rockbox version trying to run it
- user: core
- <source>
- *: "Incompatible version"
- </source>
- <dest>
- *: "Nesaderīga versija"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_ERROR
- desc: The plugin return an error code
- user: core
- <source>
- *: "Plugin returned error"
- </source>
- <dest>
- *: "Spraudnis izmeta kļūdu"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FILETYPES_FULL
- desc: Filetype array full
- user: core
- <source>
- *: "Filetype array full"
- </source>
- <dest>
- *: "Failu Veidu Saraksts Pilns"
- </dest>
- <voice>
- *: "failu veidu saraksts pilns"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHOWDIR_BUFFER_FULL
- desc: in showdir(), displayed on screen when you reach buffer limit
- user: core
- <source>
- *: "Dir Buffer is Full!"
- </source>
- <dest>
- *: "Mapes Buferis Ir Pilns!"
- </dest>
- <voice>
- *: "mapes buferis ir pilns"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVALID_FILENAME
- desc: "invalid filename entered" error message
- user: core
- <source>
- *: "Invalid Filename!"
- </source>
- <dest>
- *: "Nederīgs Faila Nosaukums!"
- </dest>
- <voice>
- *: "nederiigs faila nosaukums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLEASE_REBOOT
- desc: when activating an option that requires a reboot
- user: core
- <source>
- *: "Please reboot to enable"
- </source>
- <dest>
- *: "PÄrstartÄ“jiet Lai IeslÄ“gtu"
- </dest>
- <voice>
- *: "paarstarteejiet lai iesleegtu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_CHARGE
- desc: tells that the battery is charging, instead of battery level
- user: core
- <source>
- *: none
- charging: "Battery: Charging"
- </source>
- <dest>
- *: none
- charging: "Baterija: LÄdÄ“jas"
- </dest>
- <voice>
- *: none
- charging: "baterija laadeejas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_TOPOFF_CHARGE
- desc: in info display, shows that top off charge is running Only for V1 archosrecorder
- user: core
- <source>
- *: none
- archosrecorder: "Battery: Top-Off Chg"
- </source>
- <dest>
- *: none
- archosrecorder: "Baterija: Beidz LÄdÄ“t"
- </dest>
- <voice>
- *: none
- archosrecorder: "pabeigshanas laadinjsh"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BATTERY_TRICKLE_CHARGE
- desc: in info display, shows that trickle charge is running
- user: core
- <source>
- *: none
- charging: "Battery: Trickle Chg"
- </source>
- <dest>
- *: none
- charging: "Baterija: UzlÄdÄ“ts"
- </dest>
- <voice>
- *: none
- charging: "laadeeshana pabeigta"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WARNING_BATTERY_LOW
- desc: general warning
- user: core
- <source>
- *: "WARNING! Low Battery!"
- </source>
- <dest>
- *: "Baterija Gandrīz Tukša!"
- </dest>
- <voice>
- *: "baterija gandriiz tuksha"
- </voice>
-</phrase>
-<phrase>
- id: LANG_WARNING_BATTERY_EMPTY
- desc: general warning
- user: core
- <source>
- *: "Battery empty! RECHARGE!"
- </source>
- <dest>
- *: "Baterija Tukša! JĀLĀDĒ!"
- </dest>
- <voice>
- *: "baterija tuksha jaalaadee"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BYTE
- desc: a unit postfix
- user: core
- <source>
- *: "B"
- </source>
- <dest>
- *: "B"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_KILOBYTE
- desc: a unit postfix, also voiced
- user: core
- <source>
- *: "KB"
- </source>
- <dest>
- *: "KB"
- </dest>
- <voice>
- *: "kilobaits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MEGABYTE
- desc: a unit postfix, also voiced
- user: core
- <source>
- *: "MB"
- </source>
- <dest>
- *: "MB"
- </dest>
- <voice>
- *: "megabaits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_GIGABYTE
- desc: a unit postfix, also voiced
- user: core
- <source>
- *: "GB"
- </source>
- <dest>
- *: "GB"
- </dest>
- <voice>
- *: "gigabaits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_POINT
- desc: decimal separator for composing numbers
- user: core
- <source>
- *: "."
- </source>
- <dest>
- *: "."
- </dest>
- <voice>
- *: "punkts"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_ZERO
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "nulle"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_ONE
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "viens"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_TWO
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "divi"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_THREE
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "triis"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FOUR
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "chetri"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FIVE
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "pieci"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SIX
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "seshi"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SEVEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "septinji"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EIGHT
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "astonji"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_NINE
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "devinji"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_TEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "desmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_ELEVEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "vienpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_TWELVE
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "divpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_THIRTEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "triispadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FOURTEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "chetrpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FIFTEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "piecpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SIXTEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "seshpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SEVENTEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "septinjpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EIGHTEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "astonjpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_NINETEEN
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "devinjpadsmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_TWENTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "divdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_THIRTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "triisdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FORTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "chetrdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FIFTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "piecdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SIXTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "seshdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SEVENTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "septinjdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EIGHTY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "astonjdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_NINETY
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "devinjdesmit"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_HUNDRED
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "simts"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_THOUSAND
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "tuukstotis"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_MILLION
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "miljons"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_BILLION
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "miljards"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_MINUS
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "miinus"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PLUS
- desc: spoken only, for composing numbers
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "plus"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_MILLISECONDS
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "milisekundes"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SECOND
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "sekunde"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_SECONDS
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "sekundes"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_MINUTE
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "minuute"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_MINUTES
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "minuutes"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_HOUR
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "stunda"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_HOURS
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "stundas"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_KHZ
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "kilohercs"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_DB
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "decibels"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PERCENT
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "procents"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_MILLIAMPHOURS
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "mili-ampeer stundas"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PIXEL
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "pikselis"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PER_SEC
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "sekundee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_HERTZ
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "hercs"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_KBIT_PER_SEC
- desc: spoken only, a unit postfix
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "kilobiti sekundee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_A
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "aa"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_B
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "bee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_C
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "cee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_D
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "dee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_E
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "ee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_F
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "ef"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_G
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "gaa"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_H
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "haa"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_I
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "ii"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_J
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "jee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_K
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "kaa"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_L
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "el"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_M
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "em"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_N
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "en"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_O
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "o"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_P
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "pee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_Q
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "kjuu"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_R
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "er"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_S
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "es"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_T
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "tee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_U
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "uu"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_V
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "vee"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_W
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "dabljuu"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_X
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "iks"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_Y
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "igrek"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_Z
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "zed"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_DOT
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "punkts"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PAUSE
- desc: spoken only, for spelling, a split second of silence (difficult to author)
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: " "
- </voice>
-</phrase>
-<phrase>
- id: VOICE_FILE
- desc: spoken only, prefix for file number
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "fails"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_DIR
- desc: spoken only, prefix for directory number
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "mape"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_MPA
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "audio"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_CFG
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "konfiguraacija"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_WPS
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "atskanjoshanas ekraans"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_ROCK
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "spraudnis"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_FONT
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "fonts"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_BMARK
- desc: spoken only, for file extension and the word in general
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "graamatziime"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_AJZ
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "programmatuura"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_RWPS
- desc: spoken only, for file extension
- user: core
- <source>
- *: none
- remote: ""
- </source>
- <dest>
- *: none
- remote: ""
- </dest>
- <voice>
- *: none
- remote: "pults atskanjoshanas ekraans"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_KBD
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "klaviatuura"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_CUESHEET
- desc:
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "cue fails"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_BOOKMARK_SELECT_INDEX_TEXT
- desc: voice only, used in the bookmark list to label index number
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "indekss"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CURRENT_TIME
- desc: spoken only, for wall clock announce
- user: core
- <source>
- *: none
- rtc: ""
- </source>
- <dest>
- *: none
- rtc: ""
- </dest>
- <voice>
- *: none
- rtc: "Patreizeejais laiks:"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_EQUALIZER_EDIT_MODE
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Edit mode: %s %s"
- </source>
- <dest>
- *: none
- swcodec: "Izmainit: %s %s"
- </dest>
- <voice>
- *: none
- swcodec: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_EQUALIZER_BAND_CUTOFF
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Cutoff"
- </source>
- <dest>
- *: none
- swcodec: "Robeza"
- </dest>
- <voice>
- *: none
- swcodec: "robezhfrekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_GAIN
- desc: in the equalizer settings menu
- user: core
- <source>
- *: none
- swcodec: "Gain"
- </source>
- <dest>
- *: none
- swcodec: "Pastiprinajums"
- </dest>
- <voice>
- *: none
- swcodec: "pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_MODE
- desc: in wps F2 pressed
- user: core
- <source>
- *: none
- lcd_bitmap: "Mode:"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Režīms:"
- </dest>
- <voice>
- *: none
- lcd_bitmap: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_DIRBROWSE_F1
- desc: in dir browser, F1 button bar text
- user: core
- <source>
- *: none
- recorder_pad: "Menu"
- </source>
- <dest>
- *: none
- recorder_pad: "Izvēlne"
- </dest>
- <voice>
- *: none
- recorder_pad: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_DIRBROWSE_F2
- desc: in dir browser, F2 button bar text
- user: core
- <source>
- *: none
- recorder_pad: "Option"
- </source>
- <dest>
- *: none
- recorder_pad: "Opcija"
- </dest>
- <voice>
- *: none
- recorder_pad: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_DIRBROWSE_F3
- desc: in dir browser, F3 button bar text
- user: core
- <source>
- *: none
- recorder_pad: "LCD"
- </source>
- <dest>
- *: none
- recorder_pad: "EkrÄns"
- </dest>
- <voice>
- *: none
- recorder_pad: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_CHANNEL_STEREO
- desc: in sound_settings
- user: core
- <source>
- *: none
- recording: "Stereo"
- </source>
- <dest>
- *: none
- recording: "Stereo"
- </dest>
- <voice>
- *: none
- recording: "stereo"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_CHANNEL_MONO
- desc: in sound_settings
- user: core
- <source>
- *: none
- recording: "Mono"
- </source>
- <dest>
- *: none
- recording: "Mono"
- </dest>
- <voice>
- *: none
- recording: "mono"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_RECORDING_QUALITY
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording_hwcodec: "Quality"
- </source>
- <dest>
- *: none
- recording_hwcodec: "KvalitÄte"
- </dest>
- <voice>
- *: none
- recording_hwcodec: "kvalitaate"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_RECORDING_FREQUENCY
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Frequency"
- </source>
- <dest>
- *: none
- recording: "Frekvence"
- </dest>
- <voice>
- *: none
- recording: "frekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_RECORDING_SOURCE
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Source"
- </source>
- <dest>
- *: none
- recording: "Avots"
- </dest>
- <voice>
- *: none
- recording: "avots"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_RECORDING_SRC_MIC
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Int. Mic"
- </source>
- <dest>
- *: none
- recording: "Ieb. Mikr"
- </dest>
- <voice>
- *: none
- recording: "iebuuveetais mikrofons"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_LINE_IN
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Line In"
- </source>
- <dest>
- *: none
- recording: "LineÄrÄ Ieeja"
- </dest>
- <voice>
- *: none
- recording: "lineaaraa ieeja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_RECORDING_SRC_DIGITAL
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Digital"
- </source>
- <dest>
- *: none
- recording: "DigitÄlÄ"
- </dest>
- <voice>
- *: none
- recording: "digitaalaa ieeja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_CHANNELS
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording: "Channels"
- </source>
- <dest>
- *: none
- recording: "KanÄli"
- </dest>
- <voice>
- *: none
- recording: "kanaali"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SYSFONT_RECORD_TRIGGER
- desc: in recording settings_menu
- user: core
- <source>
- *: none
- recording: "Trigger"
- </source>
- <dest>
- *: none
- recording: "Palaidējs"
- </dest>
- <voice>
- *: none
- recording: "palaideejs"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_OF
- desc: spoken only, as in 3/8 => 3 of 8
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "no"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_GAMES
- desc: in the main menu
- user: core
- <source>
- *: "Games"
- </source>
- <dest>
- *: "Spēles"
- </dest>
- <voice>
- *: "speeles"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_APPS
- desc: in the main menu
- user: core
- <source>
- *: "Applications"
- </source>
- <dest>
- *: "Programmas"
- </dest>
- <voice>
- *: "programmas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLUGIN_DEMOS
- desc: in the main menu
- user: core
- <source>
- *: "Demos"
- </source>
- <dest>
- *: "DemonstrÄcijas"
- </dest>
- <voice>
- *: "demonstraacijas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_GROUPING
- desc: in tag viewer
- user: core
- <source>
- *: "Work"
- </source>
- <dest>
- *: "Darbs"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_SHOW_FILENAME_EXT
- desc: in settings_menu
- user: core
- <source>
- *: "Show Filename Extensions"
- </source>
- <dest>
- *: "RÄdÄ«t PaplaÅ¡inÄjumus"
- </dest>
- <voice>
- *: "raadiit paplashinaajumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_UNKNOWN_TYPES
- desc: in settings_menu
- user: core
- <source>
- *: "Only Unknown Types"
- </source>
- <dest>
- *: "Tikai NezinÄmiem"
- </dest>
- <voice>
- *: "tikai nezinaamiem"
- </voice>
-</phrase>
-<phrase>
- id: LANG_EXT_ONLY_VIEW_ALL
- desc: in settings_menu
- user: core
- <source>
- *: "Only When Viewing All Types"
- </source>
- <dest>
- *: "Tikai Skatoties Visus Veidus"
- </dest>
- <voice>
- *: "tikai skatoties visus veidus"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PM_UNITS_PER_TICK
- desc: spoken only, peak meter release unit
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "vieniibas uz klikshkji"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_OCLOCK
- desc: spoken only, for wall clock announce
- user: core
- <source>
- *: none
- rtc: ""
- </source>
- <dest>
- *: none
- rtc: ""
- </dest>
- <voice>
- *: none
- rtc: "pulkstenis"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_PM
- desc: spoken only, for wall clock announce
- user: core
- <source>
- *: none
- rtc: ""
- </source>
- <dest>
- *: none
- rtc: ""
- </dest>
- <voice>
- *: none
- rtc: "pee em"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_AM
- desc: spoken only, for wall clock announce
- user: core
- <source>
- *: none
- rtc: ""
- </source>
- <dest>
- *: none
- rtc: ""
- </dest>
- <voice>
- *: none
- rtc: "aa em"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_OH
- desc: spoken only, for wall clock announce
- user: core
- <source>
- *: none
- rtc: ""
- </source>
- <dest>
- *: none
- rtc: ""
- </dest>
- <voice>
- *: none
- rtc: " "
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_CLIPCOUNTER
- desc: in settings, for recording peak meter
- user: core
- <source>
- *: none
- recording: "Clip Counter"
- </source>
- <dest>
- *: none
- recording: "PÄrlÄ«meņa SkaitÄ«tÄjs"
- </dest>
- <voice>
- *: none
- recording: "paarliimenja skaitiitaajs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SELECTOR_START_COLOR
- desc: line selector color option
- user: core
- <source>
- *: none
- lcd_color: "Primary Colour"
- </source>
- <dest>
- *: none
- lcd_color: "PrimÄrÄ KrÄsa"
- </dest>
- <voice>
- *: none
- lcd_color: "primaaraa kraasa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SELECTOR_END_COLOR
- desc: line selector color option
- user: core
- <source>
- *: none
- lcd_color: "Secondary Colour"
- </source>
- <dest>
- *: none
- lcd_color: "SekundÄrÄ KrÄsa"
- </dest>
- <voice>
- *: none
- lcd_color: "sekundaaraa kraasa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SELECTOR_TEXT_COLOR
- desc: line selector text color option
- user: core
- <source>
- *: none
- lcd_color: "Text Colour"
- </source>
- <dest>
- *: none
- lcd_color: "Teksta KrÄsa"
- </dest>
- <voice>
- *: none
- lcd_color: "teksta kraasa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT_CURSOR_COLOR
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_color: "Bar (Solid Colour)"
- </source>
- <dest>
- *: none
- lcd_color: "Josla (VienkrÄsaina)"
- </dest>
- <voice>
- *: none
- lcd_color: "vienkraasaina josla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INVERT_CURSOR_GRADIENT
- desc: in settings_menu
- user: core
- <source>
- *: none
- lcd_color: "Bar (Gradient Colour)"
- </source>
- <dest>
- *: none
- lcd_color: "Josla (Mainīgas Krasas)"
- </dest>
- <voice>
- *: none
- lcd_color: "mainiigu kraasu josla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CODEPAGE_CENTRAL_EUROPEAN
- desc: in codepage setting menu
- user: core
- <source>
- *: "Central European (CP1250)"
- </source>
- <dest>
- *: "CentrÄlÄs Eiropas (CP1250)"
- </dest>
- <voice>
- *: "centraalaas eiropas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_THEME_MENU
- desc: in the settings menu
- user: core
- <source>
- *: "Theme Settings"
- </source>
- <dest>
- *: "TÄ“mas UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: "teemas uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COLORS_MENU
- desc: colours menu under theme settings
- user: core
- <source>
- *: none
- lcd_color: "Colours"
- </source>
- <dest>
- *: none
- lcd_color: "KrÄsas"
- </dest>
- <voice>
- *: none
- lcd_color: "kraasas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SELECTOR_COLOR_MENU
- desc: line selector color menu title
- user: core
- <source>
- *: none
- lcd_color: "Line Selector Colours"
- </source>
- <dest>
- *: none
- lcd_color: "IzvÄ“les Joslas KrÄsas"
- </dest>
- <voice>
- *: none
- lcd_color: "izveeles joslas kraasas"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EDIT
- desc: keyboard
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "redigjeet"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_BLANK
- desc: keyboard
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "tukshs"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EMPTY_LIST
- desc: spoken only, when a list dialog contains no elements
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "tukshs saraksts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NOT_PRESENT
- desc: when external memory is not present
- user: core
- <source>
- *: none
- multivolume: "Not present"
- </source>
- <dest>
- *: none
- multivolume: "Nav"
- </dest>
- <voice>
- *: none
- multivolume: "nav"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TALK_BATTERY_LEVEL
- desc: Setting for spontaneous battery level announcement
- user: core
- <source>
- *: "Announce Battery Level"
- </source>
- <dest>
- *: "IzrunÄt Baterijas LÄ«meni"
- </dest>
- <voice>
- *: "izrunaat baterijas liimeni"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VOICE_FILETYPE
- desc: voice settings menu
- user: core
- <source>
- *: "Say File Type"
- </source>
- <dest>
- *: "IzrunÄt Faila Veidu"
- </dest>
- <voice>
- *: "izrunaat faila veidu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BASS_CUTOFF
- desc: Bass setting cut-off frequency
- user: core
- <source>
- *: none
- ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "Bass Cutoff"
- </source>
- <dest>
- *: none
- ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "Basu Robežfrekvence"
- </dest>
- <voice>
- *: none
- ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "basu robezhfrekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TREBLE_CUTOFF
- desc: Treble setting cut-off frequency
- user: core
- <source>
- *: none
- ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "Treble Cutoff"
- </source>
- <dest>
- *: none
- ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "AF Robežfrekvence"
- </dest>
- <voice>
- *: none
- ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "augsto frekvenchu robezhfrekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGNAVI_RANDOM
- desc: "<Random>" entry in tag browser
- user: core
- <source>
- *: "<Random>"
- </source>
- <dest>
- *: "<DažÄdi>"
- </dest>
- <voice>
- *: "dazhaadi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SAVE_SOUND
- desc: save a sound config file
- user: core
- <source>
- *: "Save Sound Settings"
- </source>
- <dest>
- *: "SaglabÄt Skaņas UzstÄdÄ«jumus"
- </dest>
- <voice>
- *: "saglabaat skanjas uzstaadiijumus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KEYCLICK
- desc: in keyclick settings menu
- user: core
- <source>
- *: none
- swcodec: "Keyclick"
- </source>
- <dest>
- *: none
- swcodec: "Klikšķis"
- </dest>
- <voice>
- *: none
- swcodec: "klikshkjis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KEYCLICK_REPEATS
- desc: in keyclick settings menu
- user: core
- <source>
- *: none
- swcodec: "Keyclick Repeats"
- </source>
- <dest>
- *: none
- swcodec: "Klikšķu AtkÄrtoÅ¡ana"
- </dest>
- <voice>
- *: none
- swcodec: "klikshkju atkaartoshana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ACCESSORY_SUPPLY
- desc: in system settings menu
- user: core
- <source>
- *: none
- accessory_supply: "Accessory Power Supply"
- </source>
- <dest>
- *: none
- accessory_supply: "AksesuÄru BaroÅ¡ana"
- </dest>
- <voice>
- *: none
- accessory_supply: "aksesuaaru baroshana"
- </voice>
-</phrase>
-<phrase>
- id: LANG_UNKNOWN
- desc: generic string for unknown states, such as an unset clock
- user: core
- <source>
- *: "Unknown"
- </source>
- <dest>
- *: "NezinÄms"
- </dest>
- <voice>
- *: "nezinaams"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_QUICKSCREEN
- desc: spoken only, Announces entering the "quick screen"
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "aatrais ekraans"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_OK
- desc: spoken only, On exiting a context, specifically the quick screen
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "labi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STOP_RECORDING_AND_SHUTDOWN
- desc: in record timesplit options
- user: core
- <source>
- *: none
- recording: "Stop Recording And Shutdown"
- </source>
- <dest>
- *: none
- recording: "Beigt Ierakstu Un Izslēgties"
- </dest>
- <voice>
- *: none
- recording: "beigt ierakstu un izsleegties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHPAD_SENSITIVITY
- desc: touchpad sensitivity setting
- user: core
- <source>
- *: none
- gigabeatfx: "Touchpad Sensitivity"
- </source>
- <dest>
- *: none
- gigabeatfx: "SkÄrienvirsmas JÅ«tÄ«ba"
- </dest>
- <voice>
- *: none
- gigabeatfx: "skaarienvirsmas juutiiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HIGH
- desc: in settings_menu
- user: core
- <source>
- *: none
- gigabeatfx: "High"
- </source>
- <dest>
- *: none
- gigabeatfx: "Augsts"
- </dest>
- <voice>
- *: none
- gigabeatfx: "augsts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SERIAL_BITRATE
- desc: in system settings menu
- user: core
- <source>
- *: none
- serial_port: "Serial Bitrate"
- </source>
- <dest>
- *: none
- serial_port: "SeriÄlais Bitreits"
- </dest>
- <voice>
- *: none
- serial_port: "seriaalais bitreits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SERIAL_BITRATE_AUTO
- desc: in system settings menu
- user: core
- <source>
- *: none
- serial_port: "Auto"
- </source>
- <dest>
- *: none
- serial_port: "AutomÄtiski"
- </dest>
- <voice>
- *: none
- serial_port: "automaatiski"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SERIAL_BITRATE_9600
- desc: in system settings menu
- user: core
- <source>
- *: none
- serial_port: "9600"
- </source>
- <dest>
- *: none
- serial_port: "9600"
- </dest>
- <voice>
- *: none
- serial_port: "9600"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SERIAL_BITRATE_19200
- desc: in system settings menu
- user: core
- <source>
- *: none
- serial_port: "19200"
- </source>
- <dest>
- *: none
- serial_port: "19200"
- </dest>
- <voice>
- *: none
- serial_port: "19200"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SERIAL_BITRATE_38400
- desc: in system settings menu
- user: core
- <source>
- *: none
- serial_port: "38400"
- </source>
- <dest>
- *: none
- serial_port: "38400"
- </dest>
- <voice>
- *: none
- serial_port: "38400"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SERIAL_BITRATE_57600
- desc: in system settings menu
- user: core
- <source>
- *: none
- serial_port: "57600"
- </source>
- <dest>
- *: none
- serial_port: "57600"
- </dest>
- <voice>
- *: none
- serial_port: "57600"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VERY_SLOW
- desc: in settings_menu
- user: core
- <source>
- *: "Very slow"
- </source>
- <dest>
- *: "Ļoti Lēns"
- </dest>
- <voice>
- *: "ljoti leens"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SLOW
- desc: in settings_menu
- user: core
- <source>
- *: "Slow"
- </source>
- <dest>
- *: "Lēns"
- </dest>
- <voice>
- *: "leens"
- </voice>
-</phrase>
-<phrase>
- id: LANG_VERY_FAST
- desc: in settings_menu
- user: core
- <source>
- *: "Very fast"
- </source>
- <dest>
- *: "Ļoti Ātrs"
- </dest>
- <voice>
- *: "ljoti aatrs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FAST
- desc: in settings_menu
- user: core
- <source>
- *: "Fast"
- </source>
- <dest>
- *: "Ä€trs"
- </dest>
- <voice>
- *: "aatrs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SKIP_LENGTH
- desc: playback settings menu
- user: core
- <source>
- *: "Skip Length"
- </source>
- <dest>
- *: "Izlaišanas Garums"
- </dest>
- <voice>
- *: "izlaishanas garums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SKIP_TRACK
- desc: skip length setting entry 0
- user: core
- <source>
- *: "Skip Track"
- </source>
- <dest>
- *: "Izlaist Dziesmu"
- </dest>
- <voice>
- *: "izlaist dziesmu"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_CHAR_SLASH
- desc: spoken only, for spelling
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "sliipsviitra"
- </voice>
-</phrase>
-<phrase>
- id: LANG_GAIN_LEFT
- desc: in the recording screen
- user: core
- <source>
- *: none
- recording: "Gain L"
- </source>
- <dest>
- *: none
- recording: "Kreisais KanÄls"
- </dest>
- <voice>
- *: none
- recording: "kreisaa kanaala pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_GAIN_RIGHT
- desc: in the recording screen
- user: core
- <source>
- *: none
- recording: "Gain R"
- </source>
- <dest>
- *: none
- recording: "Labais KanÄls"
- </dest>
- <voice>
- *: none
- recording: "labaa kanaala pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_AGC_PRESET
- desc: automatic gain control in record settings and screen
- user: core
- <source>
- *: none
- agc: "AGC"
- </source>
- <dest>
- *: none
- agc: "APR"
- </dest>
- <voice>
- *: none
- agc: "automaatiska pastiprinaajuma regulaacija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_AGC_CLIPTIME
- desc: in record settings
- user: core
- <source>
- *: none
- agc: "AGC clip time"
- </source>
- <dest>
- *: none
- agc: "APR Ätrums"
- </dest>
- <voice>
- *: none
- agc: "automaatiskaas pastiprinaajuma regulaacijas aatrums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_AGC_MAXGAIN
- desc: AGC maximum gain in recording screen
- user: core
- <source>
- *: none
- agc: "AGC max. gain"
- </source>
- <dest>
- *: none
- agc: "APR maks.skaļums"
- </dest>
- <voice>
- *: none
- agc: "automaatiskaas pastiprinaajuma regulaacijas maksimaalais skaljums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_FILENAME
- desc: Filename header in recording screen
- user: core
- <source>
- *: none
- recording: "Filename:"
- </source>
- <dest>
- *: none
- recording: "Faila nosaukums:"
- </dest>
- <voice>
- *: none
- recording: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_PM_CLIPCOUNT
- desc: in recording GUI, for recording peak meter. MAX 5 characters!
- user: core
- <source>
- *: none
- recording: "CLIP:"
- </source>
- <dest>
- *: none
- recording: "PÄ€RSN:"
- </dest>
- <voice>
- *: none
- recording: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_TIMESPLIT_REC
- desc: Display of record timer interval setting, on the record screen
- user: core
- <source>
- *: none
- recording: "Split Time:"
- </source>
- <dest>
- *: none
- recording: "PÄrtraukuma Laiks:"
- </dest>
- <voice>
- *: none
- recording: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_SIZE
- desc: Display of recorded file size
- user: core
- <source>
- *: none
- recording: "Size:"
- </source>
- <dest>
- *: none
- recording: "Izmērs:"
- </dest>
- <voice>
- *: none
- recording: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_RECORDING_MONO_MODE
- desc: in the recording settings
- user: core
- <source>
- *: none
- recording_swcodec: "Mono mode"
- </source>
- <dest>
- *: none
- recording_swcodec: "Mono režīms"
- </dest>
- <voice>
- *: none
- recording_swcodec: "mono rezhiims"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SEARCH_RESULTS
- desc: title for the list of results displayed after searching in a playlist
- user: core
- <source>
- *: "Search Results"
- </source>
- <dest>
- *: "Meklēšanas RezultÄti"
- </dest>
- <voice>
- *: "mekleeshanas rezultaati"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LEFT
- desc: Generic use of 'left'
- user: core
- <source>
- *: "Left"
- </source>
- <dest>
- *: "Pa Kreisi"
- </dest>
- <voice>
- *: "pa kreisi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RIGHT
- desc: Generic use of 'right'
- user: core
- <source>
- *: "Right"
- </source>
- <dest>
- *: "Pa Labi"
- </dest>
- <voice>
- *: "pa labi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET_SETTING
- desc: used in the settings context menu
- user: core
- <source>
- *: "Reset Setting"
- </source>
- <dest>
- *: "Atjaunot UzstÄdÄ«jumu"
- </dest>
- <voice>
- *: "atjaunot uzstaadiijumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LEFT_QS_ITEM
- desc: used for the submenu name for the quickscreen items
- user: core
- <source>
- *: none
- quickscreen: "Set as Left Quickscreen Item"
- </source>
- <dest>
- *: none
- quickscreen: "Uzlikt KÄ Kr.Ä€tro UzstÄdÄ«jumu"
- </dest>
- <voice>
- *: none
- quickscreen: "uzlikt kaa kreiso aatro uzstaadiijumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RIGHT_QS_ITEM
- desc: used for the submenu name for the quickscreen items
- user: core
- <source>
- *: none
- quickscreen: "Set as Right Quickscreen Item"
- </source>
- <dest>
- *: none
- quickscreen: "Uzlikt KÄ L.Ä€tro UzstÄdÄ«jumu"
- </dest>
- <voice>
- *: none
- quickscreen: "uzliklt kaa labo aatro uzstaadiijumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOTTOM_QS_ITEM
- desc: used for the submenu name for the quickscreen items
- user: core
- <source>
- *: none
- quickscreen: "Set as Bottom Quickscreen Item"
- </source>
- <dest>
- *: none
- quickscreen: "Uzlikt KÄ Ap.Ä€tro UzstÄdÄ«jumu"
- </dest>
- <voice>
- *: none
- quickscreen: "uzlikt kaa apaksheejo aatro uzstaadiijumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CREDITS
- desc: in the Main Menu -> System screen
- user: core
- <source>
- *: "Credits"
- </source>
- <dest>
- *: "Pateicības"
- </dest>
- <voice>
- *: "pateiciibas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_INTERPRET_NUMBERS
- desc: in Settings -> File view
- user: core
- <source>
- *: "Interpret numbers when sorting"
- </source>
- <dest>
- *: "Numuru InterpretÄcija KÄrtojot"
- </dest>
- <voice>
- *: "numuru interpretaacija kaartojot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_INTERPRET_AS_DIGIT
- desc: in Settings -> File view
- user: core
- <source>
- *: "As digits"
- </source>
- <dest>
- *: "KÄ ciparus"
- </dest>
- <voice>
- *: "kaa ciparus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SORT_INTERPRET_AS_NUMBERS
- desc: in Settings -> File view
- user: core
- <source>
- *: "As whole numbers"
- </source>
- <dest>
- *: "KÄ numurus"
- </dest>
- <voice>
- *: "kaa numurus"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ENABLE_SPEAKER
- desc: in Settings -> Sound Settings
- user: core
- <source>
- *: none
- speaker: "Enable Speaker"
- </source>
- <dest>
- *: none
- speaker: "Ieslēgt Skaļruni"
- </dest>
- <voice>
- *: none
- speaker: "iesleegt skaljruni"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHSCREEN_MODE
- desc: in Settings -> General -> Display -> Touchscreen Settings
- user: core
- <source>
- *: none
- touchscreen: "Touchscreen Mode"
- </source>
- <dest>
- *: none
- touchscreen: "SkÄrienjÅ«tÄ«gais EkrÄns"
- </dest>
- <voice>
- *: none
- touchscreen: "skaarienjuutiigais ekraans"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHSCREEN_GRID
- desc: in Settings -> General -> Display -> Touchscreen Settings
- user: core
- <source>
- *: none
- touchscreen: "3x3 Grid"
- </source>
- <dest>
- *: none
- touchscreen: "3x3 Tīkls"
- </dest>
- <voice>
- *: none
- touchscreen: "triis reiz triis tiikls"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHSCREEN_POINT
- desc: in Settings -> General -> Display -> Touchscreen Settings
- user: core
- <source>
- *: none
- touchscreen: "Absolute Point"
- </source>
- <dest>
- *: none
- touchscreen: "Absolūtais Punkts"
- </dest>
- <voice>
- *: none
- touchscreen: "absoluutais punkts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PREVENT_SKIPPING
- desc: in Settings -> Playback Settings
- user: core
- <source>
- *: "Prevent Track Skipping"
- </source>
- <dest>
- *: "Novērst Dziesmu Izlaišanu"
- </dest>
- <voice>
- *: "noveerst dziesmu izlaishanu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TIMESTRETCH
- desc: timestretch enable
- user: core
- <source>
- *: none
- swcodec: "Timestretch"
- </source>
- <dest>
- *: none
- swcodec: "Ātruma Maiņa"
- </dest>
- <voice>
- *: none
- swcodec: "aatruma mainja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SPEED
- desc: timestretch speed
- user: core
- <source>
- *: none
- swcodec: "Speed"
- </source>
- <dest>
- *: none
- swcodec: "Ä€trums"
- </dest>
- <voice>
- *: none
- swcodec: "aatrums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHSCREEN_SETTINGS
- desc: in Settings -> General -> Display menu
- user: core
- <source>
- *: none
- touchscreen: "Touchscreen Settings"
- </source>
- <dest>
- *: none
- touchscreen: "Sk.EkrÄna UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: none
- touchscreen: "skaarienjuutiigaa ekraana uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHSCREEN_CALIBRATE
- desc: in Settings -> General -> Display -> Touchscreen Settings
- user: core
- <source>
- *: none
- touchscreen: "Calibrate"
- </source>
- <dest>
- *: none
- touchscreen: "Kalibrēt"
- </dest>
- <voice>
- *: none
- touchscreen: "kalibreet"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOUCHSCREEN_RESET_CALIBRATION
- desc: in Settings -> General -> Display -> Touchscreen Settings
- user: core
- <source>
- *: none
- touchscreen: "Reset Calibration"
- </source>
- <dest>
- *: none
- touchscreen: "IzdzÄ“st KalibrÄciju"
- </dest>
- <voice>
- *: none
- touchscreen: "izdzeest kalibraaciju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STATUSBAR_TOP
- desc: in Settings -> General -> Display -> statusbar
- user: core
- <source>
- *: "Top"
- </source>
- <dest>
- *: "AugÅ¡Ä"
- </dest>
- <voice>
- *: "augshaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STATUSBAR_BOTTOM
- desc: in Settings -> General -> Display -> statusbar
- user: core
- <source>
- *: "Bottom"
- </source>
- <dest>
- *: "ApakÅ¡Ä"
- </dest>
- <voice>
- *: "apakshaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_STATUSBAR
- desc: in Settings -> General -> Display -> statusbar
- user: core
- <source>
- *: none
- remote: "Remote Statusbar"
- </source>
- <dest>
- *: none
- remote: "Pults Statusajosla"
- </dest>
- <voice>
- *: none
- remote: "pults statusa josla"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SEMITONE
- desc:
- user: core
- <source>
- *: none
- pitchscreen: "Semitone"
- </source>
- <dest>
- *: none
- pitchscreen: "Pustonis"
- </dest>
- <voice>
- *: none
- pitchscreen: "pustonis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STRETCH_LIMIT
- desc: "limit" in pitch screen
- user: core
- <source>
- *: none
- pitchscreen: "Limit"
- </source>
- <dest>
- *: none
- pitchscreen: "Ierobežojums"
- </dest>
- <voice>
- *: none
- pitchscreen: "ierobezhojums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PLAYBACK_RATE
- desc: "rate" in pitch screen
- user: core
- <source>
- *: none
- pitchscreen: "Rate"
- </source>
- <dest>
- *: none
- pitchscreen: "Ä€trums"
- </dest>
- <voice>
- *: none
- pitchscreen: "aatrums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_USB_KEYPAD_MODE
- desc: in settings_menu
- user: core
- <source>
- *: none
- usb_hid: "USB Keypad Mode"
- </source>
- <dest>
- *: none
- usb_hid: "USB Klaviatūras Režīms"
- </dest>
- <voice>
- *: none
- usb_hid: "uuesbee klaviatuuras rezhiims"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MULTIMEDIA_MODE
- desc: in settings_menu
- user: core
- <source>
- *: none
- usb_hid: "Multimedia"
- </source>
- <dest>
- *: none
- usb_hid: "Multimēdiju"
- </dest>
- <voice>
- *: none
- usb_hid: "multimeediju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PRESENTATION_MODE
- desc: in settings_menu
- user: core
- <source>
- *: none
- usb_hid: "Presentation"
- </source>
- <dest>
- *: none
- usb_hid: "PrezentÄciju"
- </dest>
- <voice>
- *: none
- usb_hid: "prezentaaciju"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BROWSER_MODE
- desc: in settings_menu
- user: core
- <source>
- *: none
- usb_hid: "Browser"
- </source>
- <dest>
- *: none
- usb_hid: "PÄrlÅ«ks"
- </dest>
- <voice>
- *: none
- usb_hid: "paarluuka"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MOUSE_MODE
- desc: in settings_menu
- user: core
- <source>
- *: none
- usb_hid: "Mouse"
- </source>
- <dest>
- *: none
- usb_hid: "Pele"
- </dest>
- <voice>
- *: none
- usb_hid: "pele"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SKIN_RAM_USAGE
- desc: how much RAM the skins are using
- user: core
- <source>
- *: "Skin RAM usage:"
- </source>
- <dest>
- *: "Ä€das RAM izl.:"
- </dest>
- <voice>
- *: "aadas ram izlietojums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLLBAR_WIDTH
- desc: in Settings -> General -> Display -> Status-/Scrollbar
- user: core
- <source>
- *: none
- lcd_bitmap: "Scroll Bar Width"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Rulljoslas Platums"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "rulljoslas platums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SCROLLBAR_POSITION
- desc: in Settings -> General -> Display -> Status-/Scrollbar
- user: core
- <source>
- *: none
- lcd_bitmap: "Scroll Bar Position"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Rulljoslas Pozīcija"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "rulljoslas poziicija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Compressor"
- </source>
- <dest>
- *: none
- swcodec: "Kompresors"
- </dest>
- <voice>
- *: none
- swcodec: "kompresors"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TOP_QS_ITEM
- desc: used for the submenu name for the quickscreen items
- user: core
- <source>
- *: none
- quickscreen: "Set as Top Quickscreen Item"
- </source>
- <dest>
- *: none
- quickscreen: "Uzlikt KÄ Aug.Ä€tro UzstÄdÄ«jumu"
- </dest>
- <voice>
- *: none
- quickscreen: "uzlikt kaa augsheejo aatro uzstaadiijumu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_ITALY
- desc: fm region Italy
- user: core
- <source>
- *: none
- radio: "Italy"
- </source>
- <dest>
- *: none
- radio: "ItÄlija"
- </dest>
- <voice>
- *: none
- radio: "itaalija"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_OTHER
- desc: Catch-all FM region. Select if none of the others work
- user: core
- <source>
- *: none
- radio: "Other"
- </source>
- <dest>
- *: none
- radio: "Cits"
- </dest>
- <voice>
- *: none
- radio: "cits"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_THRESHOLD
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Threshold"
- </source>
- <dest>
- *: none
- swcodec: "Slieksnis"
- </dest>
- <voice>
- *: none
- swcodec: "slieksnis"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RATIO
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Ratio"
- </source>
- <dest>
- *: none
- swcodec: "Attiecība"
- </dest>
- <voice>
- *: none
- swcodec: "attieciiba"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RATIO_2
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "2:1"
- </source>
- <dest>
- *: none
- swcodec: "2:1"
- </dest>
- <voice>
- *: none
- swcodec: "divi pret vienu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RATIO_4
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "4:1"
- </source>
- <dest>
- *: none
- swcodec: "4:1"
- </dest>
- <voice>
- *: none
- swcodec: "chetri pret vienu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RATIO_6
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "6:1"
- </source>
- <dest>
- *: none
- swcodec: "6:1"
- </dest>
- <voice>
- *: none
- swcodec: "seshi pret vienu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RATIO_10
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "10:1"
- </source>
- <dest>
- *: none
- swcodec: "10:1"
- </dest>
- <voice>
- *: none
- swcodec: "desmit pret vienu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RATIO_LIMIT
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Limit"
- </source>
- <dest>
- *: none
- swcodec: "Ierobežojums"
- </dest>
- <voice>
- *: none
- swcodec: "ierobezhojums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_GAIN
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Makeup Gain"
- </source>
- <dest>
- *: none
- swcodec: "Beigu PastiprinÄjums"
- </dest>
- <voice>
- *: none
- swcodec: "beigu pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTO
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Auto"
- </source>
- <dest>
- *: none
- swcodec: "AutomÄtisks"
- </dest>
- <voice>
- *: none
- swcodec: "automaatisks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_KNEE
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Knee"
- </source>
- <dest>
- *: none
- swcodec: "PÄreja"
- </dest>
- <voice>
- *: none
- swcodec: "paareja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_HARD_KNEE
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Hard Knee"
- </source>
- <dest>
- *: none
- swcodec: "Asa PÄreja"
- </dest>
- <voice>
- *: none
- swcodec: "asa paareja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_SOFT_KNEE
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Soft Knee"
- </source>
- <dest>
- *: none
- swcodec: "IzlÄ«dzinÄta PÄreja"
- </dest>
- <voice>
- *: none
- swcodec: "izliidzinaata paareja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_COMPRESSOR_RELEASE
- desc: in sound settings
- user: core
- <source>
- *: none
- swcodec: "Release Time"
- </source>
- <dest>
- *: none
- swcodec: "SamazinÄÅ¡anas Laiks"
- </dest>
- <voice>
- *: none
- swcodec: "samazinaashanas laiks"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SKIP_OUTRO
- desc: skipping to the 5 seconds before the end of a track
- user: core
- <source>
- *: "Skip to Outro"
- </source>
- <dest>
- *: "PÄrslÄ“gt Uz BeigÄm"
- </dest>
- <voice>
- *: "paarsleegt uz beigaam"
- </voice>
-</phrase>
-<phrase>
- id: LANG_STATUSBAR_CUSTOM
- desc: if this translation is compatible with LANG_CHANNEL_CUSTOM, then please use the same translation. it can be combined later then
- user: core
- <source>
- *: "Custom"
- </source>
- <dest>
- *: "Nestandarta"
- </dest>
- <voice>
- *: "nestandarta"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_SBS
- desc: spoken only, for file extension
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: "statusa joslas aada"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_RSBS
- desc: spoken only, for file extension
- user: core
- <source>
- *: none
- remote: ""
- </source>
- <dest>
- *: none
- remote: ""
- </dest>
- <voice>
- *: none
- remote: "pults statusa joslas aada"
- </voice>
-</phrase>
-<phrase>
- id: LANG_USB_HID
- desc: in settings_menu
- user: core
- <source>
- *: none
- usb_hid: "USB HID"
- </source>
- <dest>
- *: none
- usb_hid: "USB Ievades Ierīce"
- </dest>
- <voice>
- *: none
- usb_hid: "uuesbee ievades ieriice"
- </voice>
-</phrase>
-<phrase>
- id: LANG_INSERT_LAST_SHUFFLED
- desc: in onplay menu. insert a playlist randomly at end of dynamic playlist
- user: core
- <source>
- *: "Insert Last Shuffled"
- </source>
- <dest>
- *: "Ievietot Sajaukti BeigÄs"
- </dest>
- <voice>
- *: "ievietot sajaukti beigaas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_QUEUE_LAST_SHUFFLED
- desc: in onplay menu. queue a playlist randomly at end of dynamic playlist
- user: core
- <source>
- *: "Queue Last Shuffled"
- </source>
- <dest>
- *: "Ielikt Sajaukti RindÄ"
- </dest>
- <voice>
- *: "ielikt sajaukti rindaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MORSE_INPUT
- desc: in Settings -> System
- user: core
- <source>
- *: none
- morse_input: "Use Morse Code Input"
- </source>
- <dest>
- *: none
- morse_input: "Izmantot Morzes Ievadi"
- </dest>
- <voice>
- *: none
- morse_input: "izmantot morzes ievadi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTOTRACKSKIP
- desc: in crossfade settings
- user: core
- <source>
- *: none
- crossfade: "Automatic Track Change Only"
- </source>
- <dest>
- *: none
- crossfade: "Tikai AutomÄtiski PÄrslÄ“dzoties"
- </dest>
- <voice>
- *: none
- crossfade: "tikai automaatiski paarsleedzoties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NEXT_TRACK
- desc: Shown in WPS
- user: core
- <source>
- *: "Next Track:"
- </source>
- <dest>
- *: "NÄkamÄ Dziesma:"
- </dest>
- <voice>
- *: "naakamaa dziesma"
- </voice>
-</phrase>
-<phrase>
- id: LANG_NEXT
- desc: Shown in WPS (short form of Next Track)
- user: core
- <source>
- *: "Next:"
- </source>
- <dest>
- *: "NÄkamÄ:"
- </dest>
- <voice>
- *: "naakamaa"
- </voice>
-</phrase>
-<phrase>
- id: LANG_OF
- desc: Shown in WPS: X of Y (tracks)
- user: core
- <source>
- *: "of"
- </source>
- <dest>
- *: "no"
- </dest>
- <voice>
- *: "no"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BASE_SKIN
- desc: browse for the base skin in theme settings
- user: core
- <source>
- *: none
- lcd_bitmap: "Base Skin"
- </source>
- <dest>
- *: none
- lcd_bitmap: "PamatÄda"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "pamataada"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_BASE_SKIN
- desc: browse for the base skin in theme settings
- user: core
- <source>
- *: none
- lcd_bitmap: "Remote Base Skin"
- </source>
- <dest>
- *: none
- lcd_bitmap: "Pults PamatÄda"
- </dest>
- <voice>
- *: none
- lcd_bitmap: "pults pamataada"
- </voice>
-</phrase>
-<phrase>
- id: LANG_MAIN_SCREEN
- desc: in the main menu
- user: core
- <source>
- *: none
- remote: "Main Screen"
- </source>
- <dest>
- *: none
- remote: "IerÄ«ces EkrÄns"
- </dest>
- <voice>
- *: none
- remote: "ieriices ekraans"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_SCREEN
- desc: in the main menu
- user: core
- <source>
- *: none
- remote: "Remote Screen"
- </source>
- <dest>
- *: none
- remote: "Pults EkrÄns"
- </dest>
- <voice>
- *: none
- remote: "pults ekraans"
- </voice>
-</phrase>
-<phrase>
- id: LANG_LINEOUT_ONOFF
- desc: in system settings menu
- user: core
- <source>
- *: none
- lineout_poweroff: "Line Out"
- </source>
- <dest>
- *: none
- lineout_poweroff: "LineÄrÄ Izeja"
- </dest>
- <voice>
- *: none
- lineout_poweroff: "lineaaraa izeja"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HOTKEY
- desc: hotkey menu
- user: core
- <source>
- *: none
- hotkey: "Hotkey"
- </source>
- <dest>
- *: none
- hotkey: "Karstie Taustiņi"
- </dest>
- <voice>
- *: none
- hotkey: "karstie taustinji"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HOTKEY_WPS
- desc: hotkey menu
- user: core
- <source>
- *: none
- hotkey: "WPS Hotkey"
- </source>
- <dest>
- *: none
- hotkey: "Atskaņ. Loga Taustiņš"
- </dest>
- <voice>
- *: none
- hotkey: "atskanjoshanas loga taustinjsh"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HOTKEY_FILE_BROWSER
- desc: hotkey menu
- user: core
- <source>
- *: none
- hotkey: "File Browser Hotkey"
- </source>
- <dest>
- *: none
- hotkey: "Falu PÄrlÅ«ka Taustiņš"
- </dest>
- <voice>
- *: none
- hotkey: "failu paarluuka taustinjsh"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESUME_REWIND
- desc: in playback settings menu
- user: core
- <source>
- *: none
- swcodec: "Rewind Before Resume"
- </source>
- <dest>
- *: none
- swcodec: "AttÄ«t Pirms AtsÄkt"
- </dest>
- <voice>
- *: none
- swcodec: "attiit pirms atsaakt"
- </voice>
-</phrase>
-<phrase>
- id: LANG_REMOTE_RADIOSCREEN
- desc: in the theme menu
- user: core
- <source>
- *: none
- radio_remote: "Remote Radio Screen"
- </source>
- <dest>
- *: none
- radio_remote: "Pults Radio EkrÄns"
- </dest>
- <voice>
- *: none
- radio_remote: "pults radio ekraans"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_FMS
- desc: spoken only, for file extension
- user: core
- <source>
- *: none
- radio: ""
- </source>
- <dest>
- *: none
- radio: ""
- </dest>
- <voice>
- *: none
- radio: "radio ekraana aada"
- </voice>
-</phrase>
-<phrase>
- id: VOICE_EXT_RFMS
- desc: spoken only, for file extension
- user: core
- <source>
- *: none
- radio_remote: ""
- </source>
- <dest>
- *: none
- radio_remote: ""
- </dest>
- <voice>
- *: none
- radio_remote: "pults radio ekraana aada"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_STATION_HEADER
- desc: in radio screen
- user: core
- <source>
- *: none
- radio: "Station:"
- </source>
- <dest>
- *: none
- radio: "Stacija:"
- </dest>
- <voice>
- *: none
- radio: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_TONE_CONTROLS
- desc: in sound_menu, hardware equalizer tone controls
- user: core
- <source>
- *: none
- gigabeats: "Tone Controls"
- </source>
- <dest>
- *: none
- gigabeats: "Toņa Kontroles"
- </dest>
- <voice>
- *: none
- gigabeats: "tonja kontroles"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_TONE_CONTROLS_ADVANCED
- desc: in sound_menu, advanced settings for hardware equalizer tone controls
- user: core
- <source>
- *: none
- gigabeats: "Advanced Tone Control Settings"
- </source>
- <dest>
- *: none
- gigabeats: "Papildus Toņa Kontroles UzstÄdÄ«jumi"
- </dest>
- <voice>
- *: none
- gigabeats: "papildus tonja kontroles uzstaadiijumi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_GAIN
- desc: in sound_menu, hardware equalizer tone controls filter gain
- user: core
- <source>
- *: none
- gigabeats: "Band %d Gain"
- </source>
- <dest>
- *: none
- gigabeats: "Joslas %d PastiprinÄjums"
- </dest>
- <voice>
- *: none
- gigabeats: "joslas %d pastiprinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_FREQUENCY
- desc: in sound_menu, hardware equalizer tone controls shelf filter cutoff frequency
- user: core
- <source>
- *: none
- gigabeats: "Band %d Frequency"
- </source>
- <dest>
- *: none
- gigabeats: "Joslas %d Frekvence"
- </dest>
- <voice>
- *: none
- gigabeats: "joslas %d frekvence"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_WIDTH
- desc: in sound_menu, hardware equalizer tone controls peak bandwith setting
- user: core
- <source>
- *: none
- gigabeats: "Band %d Width"
- </source>
- <dest>
- *: none
- gigabeats: "Joslas %d Platums"
- </dest>
- <voice>
- *: none
- gigabeats: "joslas %d platums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_WIDTH_NARROW
- desc: in sound_menu, hardware equalizer tone controls narrow bandwith setting
- user: core
- <source>
- *: none
- gigabeats: "Narrow"
- </source>
- <dest>
- *: none
- gigabeats: "Å aurs"
- </dest>
- <voice>
- *: none
- gigabeats: "shaurs"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HW_EQ_WIDTH_WIDE
- desc: in sound_menu, hardware equalizer tone controls wide bandwidth setting
- user: core
- <source>
- *: none
- gigabeats: "Wide"
- </source>
- <dest>
- *: none
- gigabeats: "Plats"
- </dest>
- <voice>
- *: none
- gigabeats: "plats"
- </voice>
-</phrase>
-<phrase>
- id: LANG_DEPTH_3D
- desc: in sound_menu, amount of 3D enhancement effect
- user: core
- <source>
- *: none
- gigabeats,mpiohd200,mpiohd300: "3-D Enhancement"
- </source>
- <dest>
- *: none
- gigabeats,mpiohd200,mpiohd300: "3-D PaplaÅ¡inÄjums"
- </dest>
- <voice>
- *: none
- gigabeats,mpiohd200,mpiohd300: "triis dimensiju paplashinaajums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_TAGNAVI_UNTAGGED
- desc: "<untagged>" entry in tag browser
- user: core
- <source>
- *: "<Untagged>"
- </source>
- <dest>
- *: "<Neatzīmēts>"
- </dest>
- <voice>
- *: "neatziimeets"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RADIOSCREEN
- desc: in the theme menu
- user: core
- <source>
- *: none
- radio: "Radio Screen"
- </source>
- <dest>
- *: none
- radio: "Radio EkrÄns"
- </dest>
- <voice>
- *: none
- radio: "eadio ekraans"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ID3_COMPOSER
- desc: in tag viewer
- user: core
- <source>
- *: "Composer"
- </source>
- <dest>
- *: "Komponists"
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_FORCE
- desc: alternative to yes/no for tristate settings
- user: core
- <source>
- *: "Force"
- </source>
- <dest>
- *: "Piespiest"
- </dest>
- <voice>
- *: "piespiest"
- </voice>
-</phrase>
-<phrase>
- id: LANG_ONPLAY_PICTUREFLOW
- desc: Onplay pictureflow
- user: core
- <source>
- *: "PictureFlow"
- </source>
- <dest>
- *: "Attēlu Plūsma"
- </dest>
- <voice>
- *: "atveert atteelu pluusmu"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KBD_OK
- desc: in keyboard
- user: core
- <source>
- *: none
- touchscreen: "OK"
- </source>
- <dest>
- *: none
- touchscreen: "Labi"
- </dest>
- <voice>
- *: none
- touchscreen: "labi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KBD_DELETE
- desc: in keyboard
- user: core
- <source>
- *: none
- touchscreen: "Del"
- </source>
- <dest>
- *: none
- touchscreen: "Izdz"
- </dest>
- <voice>
- *: none
- touchscreen: "izdzeest"
- </voice>
-</phrase>
-<phrase>
- id: LANG_KBD_CANCEL
- desc: in keyboard
- user: core
- <source>
- *: none
- touchscreen: "Cancel"
- </source>
- <dest>
- *: none
- touchscreen: "Atteikties"
- </dest>
- <voice>
- *: none
- touchscreen: "atteikties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_BOOKMARK_SETTINGS_AUTOUPDATE
- desc: prompt for user to decide whether to update bookmarks
- user: core
- <source>
- *: "Update on Stop"
- </source>
- <dest>
- *: "Atjaunot ApstÄjoties"
- </dest>
- <voice>
- *: "atjaunot apstaajoties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SET_AS_START_DIR
- desc: used in the onplay menu to set a starting browser dir
- user: core
- <source>
- *: "Start File Browser Here"
- </source>
- <dest>
- *: "Palaist Å eit Failu PÄrlÅ«ku"
- </dest>
- <voice>
- *: "palaist sheit failu paarluuku"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET_START_DIR
- desc: reset the browser start directory
- user: core
- <source>
- *: "Start File Browser at /"
- </source>
- <dest>
- *: "PÄrstatÄ«t Failu PÄrlÅ«ku uz /"
- </dest>
- <voice>
- *: "paarstatiit failu paarluuku uz pamatmapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FM_RSSI
- desc: Signal strength of a received FM station
- user: core
- <source>
- *: none
- radio: "Signal strength:"
- </source>
- <dest>
- *: none
- radio: "SignÄla Stiprums:"
- </dest>
- <voice>
- *: none
- radio: "signaala stiprums"
- </voice>
-</phrase>
-<phrase>
- id: LANG_FILESIZE
- desc: in record timesplit options and in track information viewer
- user: core
- <source>
- *: "Filesize"
- </source>
- <dest>
- *: "Izmērs"
- </dest>
- <voice>
- *: "izmeers"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTORESUME_ENABLE
- desc: deprecated
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTORESUME_ENABLE_YES
- desc: deprecated
- user: core
- <source>
- *: ""
- </source>
- <dest>
- *: ""
- </dest>
- <voice>
- *: ""
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTORESUME
- desc: resume settings menu
- user: core
- <source>
- *: "Automatic resume"
- </source>
- <dest>
- *: "AtsÄkt AutomÄtiski"
- </dest>
- <voice>
- *: "atsaakt automaatiski"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTORESUME_AUTOMATIC
- desc: resume on automatic track change
- user: core
- <source>
- *: "Resume on automatic track change"
- </source>
- <dest>
- *: "AtsÄkt AutomÄtiski PÄrslÄ“dzoties"
- </dest>
- <voice>
- *: "atsaakt automaatiski paarsleedzoties"
- </voice>
-</phrase>
-<phrase>
- id: LANG_AUTORESUME_CUSTOM
- desc: enable customization of resume on automatic track change
- user: core
- <source>
- *: "In custom directories only"
- </source>
- <dest>
- *: "Tikai NorÄdÄ«tÄs MapÄ“s"
- </dest>
- <voice>
- *: "tikai noraadiitaas mapees"
- </voice>
-</phrase>
-<phrase>
- id: LANG_PAUSE_REWIND
- desc: Seconds to rewind when rewind on pause is enabled.
- user: core
- <source>
- *: "Rewind on Pause"
- </source>
- <dest>
- *: "Attīt Nopauzējot"
- </dest>
- <voice>
- *: "attiit nopauzeejot"
- </voice>
-</phrase>
-<phrase>
- id: LANG_CURRENT_PLAYLIST
- desc: Used when you need to say playlist, also voiced
- user: core
- <source>
- *: "Current Playlist"
- </source>
- <dest>
- *: "°Patreizējais Saraksts"
- </dest>
- <voice>
- *: "patreizeejais saraksts"
- </voice>
-</phrase>
-<phrase>
- id: LANG_USB_SKIP_FIRST_DRIVE
- desc: in settings_menu
- user: core
- <source>
- *: none
- multidrive_usb: "USB Hide Internal Drive"
- </source>
- <dest>
- *: none
- multidrive_usb: "Savienojoties Paslēpt Iekšējo Disku"
- </dest>
- <voice>
- *: none
- multidrive_usb: "savienojoties pasleept ieksheejo disku"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SET_AS_PLAYLISTCAT_DIR
- desc: used in the onplay menu to set a playlist catalogue dir
- user: core
- <source>
- *: "Set As Playlist Catalogue Directory"
- </source>
- <dest>
- *: "Uzlikt KÄ Sarakstu Kataloga Mapi"
- </dest>
- <voice>
- *: "uzlikt kaa sarakstu kataloga mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_SAVE_CHANGES
- desc: When you try to exit screens to confirm save
- user: core
- <source>
- *: "Save Changes?"
- </source>
- <dest>
- *: "SaglabÄt Izmaiņas?"
- </dest>
- <voice>
- *: "vai saglabaat izmainjas"
- </voice>
-</phrase>
-<phrase>
- id: LANG_RESET_PLAYLISTCAT_DIR
- desc:
- user: core
- <source>
- *: "Reset Playlist Catalogue Directory"
- </source>
- <dest>
- *: "PÄrstatÄ«t Sarakstu Kataloga Mapi"
- </dest>
- <voice>
- *: "paarstatiit sarakstu kataloga mapi"
- </voice>
-</phrase>
-<phrase>
- id: LANG_HISTOGRAM_INTERVAL
- desc: in record settings menu
- user: core
- <source>
- *: none
- histogram: "Histogram interval"
- </source>
- <dest>
- *: none
- histogram: "VizualizÄcijas IntervÄls"
- </dest>
- <voice>
- *: none
- histogram: "vizualizaacijas intervaals"
- </voice>
-</phrase>
+# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id$ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# +# Latvian language file, translated by MÄrtiņš Å imis jeb msh + +<phrase> + id: LANG_SET_BOOL_YES + desc: bool true representation + user: core + <source> + *: "Yes" + </source> + <dest> + *: "JÄ" + </dest> + <voice> + *: "jaa" + </voice> +</phrase> +<phrase> + id: LANG_SET_BOOL_NO + desc: bool false representation + user: core + <source> + *: "No" + </source> + <dest> + *: "NÄ“" + </dest> + <voice> + *: "nee" + </voice> +</phrase> +<phrase> + id: LANG_ON + desc: Used in a lot of places + user: core + <source> + *: "On" + </source> + <dest> + *: "IeslÄ“gts" + </dest> + <voice> + *: "iesleegts" + </voice> +</phrase> +<phrase> + id: LANG_OFF + desc: Used in a lot of places + user: core + <source> + *: "Off" + </source> + <dest> + *: "IzslÄ“gts" + </dest> + <voice> + *: "izsleegts" + </voice> +</phrase> +<phrase> + id: LANG_ASK + desc: in settings_menu + user: core + <source> + *: "Ask" + </source> + <dest> + *: "PrasÄ«t" + </dest> + <voice> + *: "prasiit" + </voice> +</phrase> +<phrase> + id: LANG_ALWAYS + desc: used in various places + user: core + <source> + *: "Always" + </source> + <dest> + *: "VienmÄ“r" + </dest> + <voice> + *: "vienmeer" + </voice> +</phrase> +<phrase> + id: LANG_NORMAL + desc: in settings_menu + user: core + <source> + *: "Normal" + </source> + <dest> + *: "NormÄls" + </dest> + <voice> + *: "normaals" + </voice> +</phrase> +<phrase> + id: LANG_GAIN + desc: Generic string for gain used in EQ menu and recording screen + user: core + <source> + *: "Gain" + </source> + <dest> + *: "PastiprinÄjums" + </dest> + <voice> + *: "pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_WAIT + desc: general please wait splash + user: core + <source> + *: "Loading..." + </source> + <dest> + *: "IelÄdÄ“..." + </dest> + <voice> + *: "notiek ielaade" + </voice> +</phrase> +<phrase> + id: LANG_LOADING_PERCENT + desc: splash number of percents loaded + user: core + <source> + *: "Loading... %d%% done (%s)" + </source> + <dest> + *: "ielaade... %d%% gatavs (%s)" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_SCANNING_DISK + desc: when booting up and rebuilding the cache and calculating free space + user: core + <source> + *: "Scanning disk..." + </source> + <dest> + *: "SkanÄ“ atmiņu..." + </dest> + <voice> + *: "skanee atminju" + </voice> +</phrase> +<phrase> + id: LANG_SHUTTINGDOWN + desc: in main menu + user: core + <source> + *: "Shutting down..." + </source> + <dest> + *: "IzslÄ“dzas..." + </dest> + <voice> + *: "izsleedzas" + </voice> +</phrase> +<phrase> + id: LANG_CANCEL + desc: Visual confirmation of canceling a changed setting + user: core + <source> + *: "Cancelled" + </source> + <dest> + *: "Atcelts" + </dest> + <voice> + *: "atcelts" + </voice> +</phrase> +<phrase> + id: LANG_FAILED + desc: Something failed. To be appended after actions + user: core + <source> + *: "Failed" + </source> + <dest> + *: "NeizdevÄs" + </dest> + <voice> + *: "neizdevaas" + </voice> +</phrase> +<phrase> + id: LANG_CHANNELS + desc: in sound_settings + user: core + <source> + *: "Channels" + </source> + <dest> + *: "KanÄli" + </dest> + <voice> + *: "kanaali" + </voice> +</phrase> +<phrase> + id: LANG_RESET_ASK + desc: confirm to reset settings + user: core + <source> + *: "Are You Sure?" + </source> + <dest> + *: "Vai esi pÄrliecinÄts?" + </dest> + <voice> + *: "vai esi paarliecinaats" + </voice> +</phrase> +<phrase> + id: LANG_CONFIRM_WITH_BUTTON + desc: Generic string to use to confirm + user: core + <source> + *: "PLAY = Yes" + cowond2*: "MENU, or top-right = Yes" + iriverh100,iriverh120,iriverh300: "NAVI = Yes" + samsungyh*,ipod*,iaudiox5,iaudiom5,gigabeat*,sansae200*,sansac200*,iriverh10,iriverh10_5gb,mrobe100,sansaclip*,sansafuze*: "SELECT = Yes" + mrobe500: "PLAY, POWER, or top-right = Yes" + archosplayer: "(PLAY/STOP)" + vibe500: "OK = Yes" + </source> + <dest> + *: "PLAY = JÄ" + cowond2*: "MENU, vai labÄ augšējÄ = JÄ" + iriverh100,iriverh120,iriverh300: "NAVI = JÄ" + samsungyh*,ipod*,iaudiox5,iaudiom5,gigabeat*,sansae200*,sansac200*,iriverh10,iriverh10_5gb,mrobe100,sansaclip*,sansafuze*: "SELECT = JÄ" + mrobe500: "PLAY, POWER, vai labÄ augšējÄ = JÄ" + archosplayer: "(PLAY/STOP)" + vibe500: "OK = JÄ" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_CANCEL_WITH_ANY + desc: Generic string to use to cancel + user: core + <source> + *: "Any Other = No" + archosplayer: none + </source> + <dest> + *: "Jebkas cits = NÄ“" + archosplayer: none + </dest> + <voice> + *: "" + archosplayer: none + </voice> +</phrase> +<phrase> + id: LANG_ROCKBOX_TITLE + desc: main menu title + user: core + <source> + *: "Rockbox" + </source> + <dest> + *: "Rockbox" + </dest> + <voice> + *: "Rockbox" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_MENU_RECENT_BOOKMARKS + desc: in the main menu + user: core + <source> + *: "Recent Bookmarks" + </source> + <dest> + *: "NesenÄs GrÄmatzÄ«mes" + </dest> + <voice> + *: "nesenaas graamatziimes" + </voice> +</phrase> +<phrase> + id: LANG_DIR_BROWSER + desc: main menu title + user: core + <source> + *: "Files" + </source> + <dest> + *: "Faili" + </dest> + <voice> + *: "faili" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE + desc: in the main menu and the settings menu + user: core + <source> + *: "Database" + </source> + <dest> + *: "DatubÄze" + </dest> + <voice> + *: "datubaaze" + </voice> +</phrase> +<phrase> + id: LANG_NOW_PLAYING + desc: in the main menu + user: core + <source> + *: "Now Playing" + </source> + <dest> + *: "Å obrÄ«d Atskaņo" + </dest> + <voice> + *: "shobriid atskanjo" + </voice> +</phrase> +<phrase> + id: LANG_RESUME_PLAYBACK + desc: in the main menu + user: core + <source> + *: "Resume Playback" + </source> + <dest> + *: "TurpinÄt AtskaņoÅ¡anu" + </dest> + <voice> + *: "turpinaat atskanjoshanu" + </voice> +</phrase> +<phrase> + id: LANG_SETTINGS + desc: in main menu and visual confirmation after settings reset + user: core + <source> + *: "Settings" + </source> + <dest> + *: "UzstÄdÄ«jumi" + </dest> + <voice> + *: "uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING + desc: in the main menu + user: core + <source> + *: none + recording: "Recording" + </source> + <dest> + *: none + recording: "Ierakstīšana" + </dest> + <voice> + *: none + recording: "ierakstiishana" + </voice> +</phrase> +<phrase> + id: LANG_FM_RADIO + desc: in the main menu + user: core + <source> + *: none + radio: "FM Radio" + </source> + <dest> + *: none + radio: "FM Radio" + </dest> + <voice> + *: none + radio: "fm radio" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLISTS + desc: in the file view setting + user: core + <source> + *: "Playlists" + </source> + <dest> + *: "Izlases" + </dest> + <voice> + *: "izlases" + </voice> +</phrase> +<phrase> + id: LANG_PLUGINS + desc: in the main menu + user: core + <source> + *: "Plugins" + </source> + <dest> + *: "Spraudņi" + </dest> + <voice> + *: "spraudnji" + </voice> +</phrase> +<phrase> + id: LANG_SYSTEM + desc: in the main menu and settings menu + user: core + <source> + *: "System" + </source> + <dest> + *: "SistÄ“ma" + </dest> + <voice> + *: "sisteema" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SELECT_BOOKMARK + desc: bookmark selection list title + user: core + <source> + *: "Select Bookmark" + </source> + <dest> + *: "IzvÄ“lÄ“ties GrÄmatzÄ«mi" + </dest> + <voice> + *: "izveeleeties graamatziimi" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_DONT_RESUME + desc: top item in the list when asking user about bookmark auto load + user: core + <source> + *: "<Don't Resume>" + </source> + <dest> + *: "<NeatsÄkt>" + </dest> + <voice> + *: "neatsaakt" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SHUFFLE + desc: bookmark selection list, bookmark enables shuffle + user: core + <source> + *: ", Shuffle" + </source> + <dest> + *: ", PÄrmaiņus" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_INVALID + desc: bookmark selection list, bookmark couldn't be parsed + user: core + <source> + *: "<Invalid Bookmark>" + </source> + <dest> + *: "<NederÄ«ga GrÄmatzÄ«me>" + </dest> + <voice> + *: "nederiiga graamatziime" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_CONTEXT_MENU + desc: bookmark selection list context menu + user: core + <source> + *: "Bookmark Actions" + </source> + <dest> + *: "GrÄmatzÄ«mju DarbÄ«bas" + </dest> + <voice> + *: "graamatziimju darbiibas" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_CONTEXT_RESUME + desc: bookmark context menu, resume this bookmark + user: core + <source> + *: "Resume" + </source> + <dest> + *: "AtsÄkt" + </dest> + <voice> + *: "atsaakt" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_CONTEXT_DELETE + desc: bookmark context menu, delete this bookmark + user: core + <source> + *: "Delete" + </source> + <dest> + *: "IzdzÄ“st" + </dest> + <voice> + *: "izdzeest" + </voice> +</phrase> +<phrase> + id: LANG_AUTO_BOOKMARK_QUERY + desc: prompt for user to decide to create an bookmark + user: core + <source> + *: "Create a Bookmark?" + </source> + <dest> + *: "Izveidot GrÄmatzÄ«mi?" + </dest> + <voice> + *: "vai izveidot graamatziimi" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_CREATE_SUCCESS + desc: Indicates bookmark was successfully created + user: core + <source> + *: "Bookmark Created" + </source> + <dest> + *: "GrÄmatzÄ«me Izveidota" + </dest> + <voice> + *: "graamatziime izveidota" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_CREATE_FAILURE + desc: Indicates bookmark was not created + user: core + <source> + *: "Bookmark Failed!" + </source> + <dest> + *: "NeizdevÄs Izveidot!" + </dest> + <voice> + *: "neizdevaas izveidot" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_LOAD_EMPTY + desc: Indicates bookmark was empty + user: core + <source> + *: "Bookmark Empty" + </source> + <dest> + *: "TukÅ¡a GrÄmatzÄ«me" + </dest> + <voice> + *: "tuksha graamatziime" + </voice> +</phrase> +<phrase> + id: LANG_SOUND_SETTINGS + desc: in the main menu + user: core + <source> + *: "Sound Settings" + </source> + <dest> + *: "Skaņas UzstÄdÄ«jumi" + </dest> + <voice> + *: "skanjas uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_VOLUME + desc: in sound_settings + user: core + <source> + *: "Volume" + </source> + <dest> + *: "Skaļums" + </dest> + <voice> + *: "skaljums" + </voice> +</phrase> +<phrase> + id: LANG_BASS + desc: in sound_settings + user: core + <source> + *: "Bass" + </source> + <dest> + *: "Basi" + </dest> + <voice> + *: "basi" + </voice> +</phrase> +<phrase> + id: LANG_TREBLE + desc: in sound_settings + user: core + <source> + *: "Treble" + </source> + <dest> + *: "AugÅ¡as" + </dest> + <voice> + *: "augshas" + </voice> +</phrase> +<phrase> + id: LANG_BALANCE + desc: in sound_settings + user: core + <source> + *: "Balance" + </source> + <dest> + *: "Balanss" + </dest> + <voice> + *: "balanss" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_CONFIGURATION + desc: in sound_settings + user: core + <source> + *: "Channel Configuration" + </source> + <dest> + *: "KanÄlu KonfigurÄcija" + </dest> + <voice> + *: "kanaalu konfiguraacija" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_STEREO + desc: in sound_settings + user: core + <source> + *: "Stereo" + </source> + <dest> + *: "Stereo" + </dest> + <voice> + *: "stereo" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_MONO + desc: in sound_settings + user: core + <source> + *: "Mono" + </source> + <dest> + *: "Mono" + </dest> + <voice> + *: "mono" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_CUSTOM + desc: in sound_settings + user: core + <source> + *: "Custom" + </source> + <dest> + *: "Nestandarta" + </dest> + <voice> + *: "nestandarta" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_LEFT + desc: in sound_settings + user: core + <source> + *: "Mono Left" + </source> + <dest> + *: "Mono Kreisais" + </dest> + <voice> + *: "mono kreisais" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_RIGHT + desc: in sound_settings + user: core + <source> + *: "Mono Right" + </source> + <dest> + *: "Mono Labais" + </dest> + <voice> + *: "mono labais" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_LEFTRIGHT + desc: in sound_settings + user: core + <source> + *: none + recording_swcodec: "Mono Left + Right" + </source> + <dest> + *: none + recording_swcodec: "Kreisais + Labais" + </dest> + <voice> + *: none + recording_swcodec: "mono kreisais plus labais" + </voice> +</phrase> +<phrase> + id: LANG_CHANNEL_KARAOKE + desc: in sound_settings + user: core + <source> + *: "Karaoke" + </source> + <dest> + *: "Karaoke" + </dest> + <voice> + *: "karaoke" + </voice> +</phrase> +<phrase> + id: LANG_STEREO_WIDTH + desc: in sound_settings + user: core + <source> + *: "Stereo Width" + </source> + <dest> + *: "Stereo Platums" + </dest> + <voice> + *: "stereo platums" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFEED + desc: in sound settings + user: core + <source> + *: none + swcodec: "Crossfeed" + </source> + <dest> + *: none + swcodec: "KanÄlu IzlÄ«dzinÄÅ¡ana" + </dest> + <voice> + *: none + swcodec: "kanaalu izliidzinaashana" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFEED_DIRECT_GAIN + desc: in crossfeed settings + user: core + <source> + *: none + swcodec: "Direct Gain" + </source> + <dest> + *: none + swcodec: "TieÅ¡ais Skaļums" + </dest> + <voice> + *: none + swcodec: "tieshais skaljums" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFEED_CROSS_GAIN + desc: in crossfeed settings + user: core + <source> + *: none + swcodec: "Cross Gain" + </source> + <dest> + *: none + swcodec: "Starpskaļums" + </dest> + <voice> + *: none + swcodec: "starpskaljums" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFEED_HF_ATTENUATION + desc: in crossfeed settings + user: core + <source> + *: none + swcodec: "High-Frequency Attenuation" + </source> + <dest> + *: none + swcodec: "Augsto FrekvenÄu VÄjinÄjums" + </dest> + <voice> + *: none + swcodec: "augsto frekvenchu vaajinaajums" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFEED_HF_CUTOFF + desc: in crossfeed settings + user: core + <source> + *: none + swcodec: "High-Frequency Cutoff" + </source> + <dest> + *: none + swcodec: "Augsto FrekvenÄu SÄkums" + </dest> + <voice> + *: none + swcodec: "augsto frekvenchu saakums" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER + desc: in the sound settings menu + user: core + <source> + *: none + swcodec: "Equalizer" + </source> + <dest> + *: none + swcodec: "Ekvalaizers" + </dest> + <voice> + *: none + swcodec: "ekvalaizers" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_ENABLED + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Enable EQ" + </source> + <dest> + *: none + swcodec: "IeslÄ“gt Ekvalaizeru" + </dest> + <voice> + *: none + swcodec: "ieslÄ“gt ekvalaizeru" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_GRAPHICAL + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Graphical EQ" + </source> + <dest> + *: none + swcodec: "Grafiskais Ekvalaizers" + </dest> + <voice> + *: none + swcodec: "grafiskais ekvalaizers" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_PRECUT + desc: in eq settings + user: core + <source> + *: none + swcodec: "Precut" + </source> + <dest> + *: none + swcodec: "PastiprinÄjums" + </dest> + <voice> + *: none + swcodec: "kopeejais frekvenchu pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_GAIN + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Simple EQ Settings" + </source> + <dest> + *: none + swcodec: "VienkÄrÅ¡otais Ekvalaizers" + </dest> + <voice> + *: none + swcodec: "vienkaarshotais ekvalaizers" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_ADVANCED + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Advanced EQ Settings" + </source> + <dest> + *: none + swcodec: "Papildus UzstÄdÄ«jumi" + </dest> + <voice> + *: none + swcodec: "papildus uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_SAVE + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Save EQ Preset" + </source> + <dest> + *: none + swcodec: "SaglabÄt UzstÄdÄ«jumus" + </dest> + <voice> + *: none + swcodec: "saglabaat ekvalaizera uzstaadiijumus" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BROWSE + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Browse EQ Presets" + </source> + <dest> + *: none + swcodec: "AplÅ«kot UzstÄdÄ«jumus" + </dest> + <voice> + *: none + swcodec: "apluukot ekvalaizera uzstaadiijumus" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_EDIT_MODE + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Edit mode: %s" + </source> + <dest> + *: none + swcodec: "Režīms: %s" + </dest> + <voice> + *: none + swcodec: "" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_GAIN_ITEM + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "%d Hz Band Gain" + </source> + <dest> + *: none + swcodec: "%d Hz Joslas Stiprums" + </dest> + <voice> + *: none + swcodec: "joslas stiprums hercos" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BAND_LOW_SHELF + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Low Shelf Filter" + </source> + <dest> + *: none + swcodec: "Basu Filtrs" + </dest> + <voice> + *: none + swcodec: "basu filtrs" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BAND_PEAK + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Peak Filter %d" + </source> + <dest> + *: none + swcodec: "Pīķa Filtrs %d" + </dest> + <voice> + *: none + swcodec: "piikja filtrs" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BAND_HIGH_SHELF + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "High Shelf Filter" + </source> + <dest> + *: none + swcodec: "Augsto FrekvenÄu Filtrs" + </dest> + <voice> + *: none + swcodec: "augsto frekvenchu filtrs" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BAND_CUTOFF + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Cutoff Frequency" + </source> + <dest> + *: none + swcodec: "Robežfrekvence" + </dest> + <voice> + *: none + swcodec: "robezhfrekvence" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BAND_CENTER + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Centre Frequency" + </source> + <dest> + *: none + swcodec: "Centra Frekvence" + </dest> + <voice> + *: none + swcodec: "centra frekvence" + </voice> +</phrase> +<phrase> + id: LANG_EQUALIZER_BAND_Q + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Q" + </source> + <dest> + *: none + swcodec: "Platums" + </dest> + <voice> + *: none + swcodec: "platums" + </voice> +</phrase> +<phrase> + id: LANG_DITHERING + desc: in the sound settings menu + user: core + <source> + *: none + swcodec: "Dithering" + </source> + <dest> + *: none + swcodec: "Skaņas IzlÄ«dzinÄÅ¡ana" + </dest> + <voice> + *: none + swcodec: "skanjas izliidzinaashana" + </voice> +</phrase> +<phrase> + id: LANG_LOUDNESS + desc: in sound_settings + user: core + <source> + *: none + masf: "Loudness" + </source> + <dest> + *: none + masf: "Skaļums" + </dest> + <voice> + *: none + masf: "skaljums" + </voice> +</phrase> +<phrase> + id: LANG_AUTOVOL + desc: in sound_settings + user: core + <source> + *: none + masf: "Auto Volume" + </source> + <dest> + *: none + masf: "Auto Skaļums" + </dest> + <voice> + *: none + masf: "auto skaljums" + </voice> +</phrase> +<phrase> + id: LANG_DECAY + desc: in sound_settings + user: core + <source> + *: none + masf: "AV Decay Time" + </source> + <dest> + *: none + masf: "AS Regulēšanas Laiks" + </dest> + <voice> + *: none + masf: "" + </voice> +</phrase> +<phrase> + id: LANG_SUPERBASS + desc: in sound settings + user: core + <source> + *: none + masf: "Super Bass" + </source> + <dest> + *: none + masf: "Basu PastiprinÄjums" + </dest> + <voice> + *: none + masf: "basu pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_MDB_ENABLE + desc: in sound settings + user: core + <source> + *: none + masf: "MDB Enable" + </source> + <dest> + *: none + masf: "IeslÄ“gt MÄkslÄ«gos Basus" + </dest> + <voice> + *: none + masf: "iesleegt maaksliigos basus" + </voice> +</phrase> +<phrase> + id: LANG_MDB_STRENGTH + desc: in sound settings + user: core + <source> + *: none + masf: "MDB Strength" + </source> + <dest> + *: none + masf: "MB Stiprums" + </dest> + <voice> + *: none + masf: "maaksliigo basu stiprums" + </voice> +</phrase> +<phrase> + id: LANG_MDB_HARMONICS + desc: in sound settings + user: core + <source> + *: none + masf: "MDB Harmonics" + </source> + <dest> + *: none + masf: "MB Konvertēšana" + </dest> + <voice> + *: none + masf: "maaksliigo basu konverteeshana" + </voice> +</phrase> +<phrase> + id: LANG_MDB_CENTER + desc: in sound settings + user: core + <source> + *: none + masf: "MDB Centre Frequency" + </source> + <dest> + *: none + masf: "MB Centra Frekvence" + </dest> + <voice> + *: none + masf: "maaksliigo basu centra frekvence" + </voice> +</phrase> +<phrase> + id: LANG_MDB_SHAPE + desc: in sound settings + user: core + <source> + *: none + masf: "MDB Shape" + </source> + <dest> + *: none + masf: "MB Forma" + </dest> + <voice> + *: none + masf: "maaksliigo basu forma" + </voice> +</phrase> +<phrase> + id: LANG_GENERAL_SETTINGS + desc: in the main menu + user: core + <source> + *: "General Settings" + </source> + <dest> + *: "VispÄrÄ“ji UzstÄdÄ«jumi" + </dest> + <voice> + *: "vispaareeji uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_PLAYBACK + desc: in settings_menu() + user: core + <source> + *: "Playback Settings" + </source> + <dest> + *: "AtskaņoÅ¡anas UzstÄdÄ«jumi" + </dest> + <voice> + *: "atskanjoshanas Uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_SHUFFLE + desc: in settings_menu + user: core + <source> + *: "Shuffle" + </source> + <dest> + *: "Jaukta SecÄ«ba" + </dest> + <voice> + *: "jaukta seciiba" + </voice> +</phrase> +<phrase> + id: LANG_REPEAT + desc: in settings_menu + user: core + <source> + *: "Repeat" + </source> + <dest> + *: "AtkÄrtot" + </dest> + <voice> + *: "atkaartot" + </voice> +</phrase> +<phrase> + id: LANG_ALL + desc: generic string used both in dir file filter and repeat mode selection + user: core + <source> + *: "All" + </source> + <dest> + *: "Visus" + </dest> + <voice> + *: "visus" + </voice> +</phrase> +<phrase> + id: LANG_REPEAT_ONE + desc: repeat one song + user: core + <source> + *: "One" + </source> + <dest> + *: "Vienu" + </dest> + <voice> + *: "vienu" + </voice> +</phrase> +<phrase> + id: LANG_REPEAT_AB + desc: repeat range from point A to B + user: core + <source> + *: "A-B" + </source> + <dest> + *: "A-B" + </dest> + <voice> + *: "aa-bee" + </voice> +</phrase> +<phrase> + id: LANG_PLAY_SELECTED + desc: in settings_menu + user: core + <source> + *: "Play Selected First" + </source> + <dest> + *: "IzvÄ“lÄ“to Atskaņot Pirmo" + </dest> + <voice> + *: "izveeleeto failu atskanjot pirmo" + </voice> +</phrase> +<phrase> + id: LANG_WIND_MENU + desc: in the playback sub menu + user: core + <source> + *: "Fast-Forward/Rewind" + </source> + <dest> + *: "PÄrtīšana/Attīšana" + </dest> + <voice> + *: "aatraa paartiishana un attiishana" + </voice> +</phrase> +<phrase> + id: LANG_FFRW_STEP + desc: in settings_menu + user: core + <source> + *: "FF/RW Min Step" + </source> + <dest> + *: "PT/ATT Min Solis" + </dest> + <voice> + *: "minimaalais solis" + </voice> +</phrase> +<phrase> + id: LANG_FFRW_ACCEL + desc: in settings_menu + user: core + <source> + *: "FF/RW Accel" + </source> + <dest> + *: "PT/ATT PaÄtrin" + </dest> + <voice> + *: "Paaatrinaajums" + </voice> +</phrase> +<phrase> + id: LANG_MP3BUFFER_MARGIN + desc: MP3 buffer margin time + user: core + <source> + *: "Anti-Skip Buffer" + flash_storage: none + </source> + <dest> + *: "PretraustīšanÄs Buferis" + flash_storage: none + </dest> + <voice> + *: "pretraustiishanaas buferis" + flash_storage: none + </voice> +</phrase> +<phrase> + id: LANG_FADE_ON_STOP + desc: options menu to set fade on stop or pause + user: core + <source> + *: "Fade on Stop/Pause" + </source> + <dest> + *: "IzdziÅ¡ana pie Stop/Pauzes" + </dest> + <voice> + *: "izdzishana pie stop vai pauzes" + </voice> +</phrase> +<phrase> + id: LANG_PARTY_MODE + desc: party mode + user: core + <source> + *: "Party Mode" + </source> + <dest> + *: "BallÄ«tes Režīms" + </dest> + <voice> + *: "balliites rezhiims" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE + desc: in playback settings + user: core + <source> + *: none + crossfade: "Crossfade" + </source> + <dest> + *: none + crossfade: "PÄrklÄÅ¡anÄs" + </dest> + <voice> + *: none + crossfade: "paarklaashanaas" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE_ENABLE + desc: in crossfade settings menu + user: core + <source> + *: none + crossfade: "Enable Crossfade" + </source> + <dest> + *: none + crossfade: "Izmantot PÄrklÄÅ¡anos" + </dest> + <voice> + *: none + crossfade: "izmantot paarklaashanos" + </voice> +</phrase> +<phrase> + id: LANG_MANTRACKSKIP + desc: in crossfade settings + user: core + <source> + *: none + crossfade: "Manual Track Skip Only" + </source> + <dest> + *: none + crossfade: "Tikai PÄrslÄ“dzot" + </dest> + <voice> + *: none + crossfade: "tikai paarsleedzot dziesmas" + </voice> +</phrase> +<phrase> + id: LANG_SHUFFLE_TRACKSKIP + desc: in settings_menu + user: core + <source> + *: none + crossfade: "Shuffle or Manual Track Skip" + </source> + <dest> + *: none + crossfade: "Jaukta SecÄ«ba Vai PÄrslÄ“dzoties" + </dest> + <voice> + *: none + crossfade: "atskanjojot jauktaa seciibaa vai paarsleedzoties" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE_FADE_IN_DELAY + desc: in crossfade settings menu + user: core + <source> + *: none + crossfade: "Fade-In Delay" + </source> + <dest> + *: none + crossfade: "Ievada Aizture" + </dest> + <voice> + *: none + crossfade: "ievada aizture" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE_FADE_IN_DURATION + desc: in crossfade settings menu + user: core + <source> + *: none + crossfade: "Fade-In Duration" + </source> + <dest> + *: none + crossfade: "Ievada Garums" + </dest> + <voice> + *: none + crossfade: "ievada garums" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE_FADE_OUT_DELAY + desc: in crossfade settings menu + user: core + <source> + *: none + crossfade: "Fade-Out Delay" + </source> + <dest> + *: none + crossfade: "Beigu Aizture" + </dest> + <voice> + *: none + crossfade: "beigu aizture" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE_FADE_OUT_DURATION + desc: in crossfade settings menu + user: core + <source> + *: none + crossfade: "Fade-Out Duration" + </source> + <dest> + *: none + crossfade: "Beigu Garums" + </dest> + <voice> + *: none + crossfade: "beigu garums" + </voice> +</phrase> +<phrase> + id: LANG_CROSSFADE_FADE_OUT_MODE + desc: in crossfade settings menu + user: core + <source> + *: none + crossfade: "Fade-Out Mode" + </source> + <dest> + *: none + crossfade: "Beigu Režīms" + </dest> + <voice> + *: none + crossfade: "beigu rezhiims" + </voice> +</phrase> +<phrase> + id: LANG_MIX + desc: in playback settings, crossfade option + user: core + <source> + *: none + crossfade: "Mix" + </source> + <dest> + *: none + crossfade: "SajaukÅ¡anÄs" + </dest> + <voice> + *: none + crossfade: "sajaukshanaas" + </voice> +</phrase> +<phrase> + id: LANG_REPLAYGAIN + desc: in replaygain + user: core + <source> + *: "Replaygain" + </source> + <dest> + *: "Skaļuma NormalizÄcija" + </dest> + <voice> + *: "skaljuma normalizaacija" + </voice> +</phrase> +<phrase> + id: LANG_REPLAYGAIN_NOCLIP + desc: in replaygain + user: core + <source> + *: none + swcodec: "Prevent Clipping" + </source> + <dest> + *: none + swcodec: "NovÄ“rst PÄrlieku Skaļumu" + </dest> + <voice> + *: none + swcodec: "noveerst paarlieku skaljumu" + </voice> +</phrase> +<phrase> + id: LANG_REPLAYGAIN_MODE + desc: in replaygain + user: core + <source> + *: "Replaygain Type" + </source> + <dest> + *: "NormalizÄcijas Veids" + </dest> + <voice> + *: "normalizaacijas veids" + </voice> +</phrase> +<phrase> + id: LANG_ALBUM_GAIN + desc: in replaygain + user: core + <source> + *: "Album Gain" + </source> + <dest> + *: "AlbÅ«mu Skaļums" + </dest> + <voice> + *: "albuumu skaljums" + </voice> +</phrase> +<phrase> + id: LANG_TRACK_GAIN + desc: in replaygain + user: core + <source> + *: "Track Gain" + </source> + <dest> + *: "Dziesmu Skaļums" + </dest> + <voice> + *: "dziesmu skaljums" + </voice> +</phrase> +<phrase> + id: LANG_SHUFFLE_GAIN + desc: use track gain if shuffle mode is on, album gain otherwise + user: core + <source> + *: "Track Gain if Shuffling" + </source> + <dest> + *: "Dziesmu Ja Jaukta SecÄ«ba" + </dest> + <voice> + *: "dziesmu ja jaukta seciiba" + </voice> +</phrase> +<phrase> + id: LANG_REPLAYGAIN_PREAMP + desc: in replaygain settings + user: core + <source> + *: "Pre-amp" + </source> + <dest> + *: "PriekÅ¡pastiprinÄjums" + </dest> + <voice> + *: "priekshpastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_BEEP + desc: in playback settings + user: core + <source> + *: none + swcodec: "Track Skip Beep" + </source> + <dest> + *: none + swcodec: "Dz.PÄrslÄ“gÅ¡anas PÄ«kstiens" + </dest> + <voice> + *: none + swcodec: "dziesmu paarsleegshanas piikstiens" + </voice> +</phrase> +<phrase> + id: LANG_WEAK + desc: in beep volume in playback settings + user: core + <source> + *: none + swcodec: "Weak" + </source> + <dest> + *: none + swcodec: "VÄjÅ¡" + </dest> + <voice> + *: none + swcodec: "vaajsh" + </voice> +</phrase> +<phrase> + id: LANG_MODERATE + desc: in beep volume in playback settings + user: core + <source> + *: none + swcodec: "Moderate" + </source> + <dest> + *: none + swcodec: "ViduvÄ“js" + </dest> + <voice> + *: none + swcodec: "viduveejs" + </voice> +</phrase> +<phrase> + id: LANG_STRONG + desc: in beep volume in playback settings + user: core + <source> + *: none + swcodec: "Strong" + </source> + <dest> + *: none + swcodec: "SpÄ“cÄ«gs" + </dest> + <voice> + *: none + swcodec: "speeciigs" + </voice> +</phrase> +<phrase> + id: LANG_SPDIF_ENABLE + desc: in playback settings menu. enable/disable the optical out + user: core + <source> + *: none + spdif_power: "Optical Output" + </source> + <dest> + *: none + spdif_power: "OptiskÄ Izeja" + </dest> + <voice> + *: none + spdif_power: "optiskaa izeja" + </voice> +</phrase> +<phrase> + id: LANG_NEXT_FOLDER + desc: in settings_menu. Should we allow move to next/prev folder from last/first track of current one + user: core + <source> + *: "Auto-Change Directory" + </source> + <dest> + *: "AutomÄtiski MainÄ«t Mapi" + </dest> + <voice> + *: "automaatiski mainiit mapi" + </voice> +</phrase> +<phrase> + id: LANG_RANDOM + desc: random folder + user: core + <source> + *: "Random" + </source> + <dest> + *: "JauktÄ SecÄ«bÄ" + </dest> + <voice> + *: "jauktaa seciibaa" + </voice> +</phrase> +<phrase> + id: LANG_AUDIOSCROBBLER + desc: "Last.fm Log" in the playback menu + user: core + <source> + *: "Last.fm Log" + </source> + <dest> + *: "Veidot Last.fm Logu" + </dest> + <voice> + *: "veidot Last.fm logu" + </voice> +</phrase> +<phrase> + id: LANG_CUESHEET_ENABLE + desc: cuesheet support option + user: core + <source> + *: "Cuesheet Support" + </source> + <dest> + *: "Cue Atbalsts" + </dest> + <voice> + *: "cue atbalsts" + </voice> +</phrase> +<phrase> + id: LANG_HEADPHONE_UNPLUG + desc: in settings_menu. + user: core + <source> + *: none + headphone_detection: "Pause on Headphone Unplug" + </source> + <dest> + *: none + headphone_detection: "Atvienojot Austiņas NopauzÄ“t" + </dest> + <voice> + *: none + headphone_detection: "atvienojot austinjas nopauzeet" + </voice> +</phrase> +<phrase> + id: LANG_HEADPHONE_UNPLUG_RESUME + desc: in pause_phones_menu. + user: core + <source> + *: none + headphone_detection: "Pause and Resume" + </source> + <dest> + *: none + headphone_detection: "NopauzÄ“t Un AtsÄkt" + </dest> + <voice> + *: none + headphone_detection: "nopauzeet un atsaakt" + </voice> +</phrase> +<phrase> + id: LANG_HEADPHONE_UNPLUG_RW + desc: deprecated + user: core + <source> + *: "" + </source> + <dest> + *: none + headphone_detection: "Attīšanas Ilgums" + </dest> + <voice> + *: none + headphone_detection: "attiishanas ilgums" + </voice> +</phrase> +<phrase> + id: LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME + desc: in pause_phones_menu. + user: core + <source> + *: none + headphone_detection: "Disable resume on startup if phones unplugged" + </source> + <dest> + *: none + headphone_detection: "Izsl AtsÄkt Palaižot ja Austiņas Izrautas" + </dest> + <voice> + *: none + headphone_detection: "izsleegt automaatisku atsaakshanu ja austinjas ir izrautas" + </voice> +</phrase> +<phrase> + id: LANG_FILE + desc: in settings_menu() + user: core + <source> + *: "File View" + </source> + <dest> + *: "Failu PÄrlÅ«ks" + </dest> + <voice> + *: "failu paarluuks" + </voice> +</phrase> +<phrase> + id: LANG_SORT_CASE + desc: in settings_menu + user: core + <source> + *: "Sort Case Sensitive" + </source> + <dest> + *: "Å Ä·irot PÄ“c Liel.Burt." + </dest> + <voice> + *: "shkjirot peec lielajiem burtiem" + </voice> +</phrase> +<phrase> + id: LANG_SORT_DIR + desc: browser sorting setting + user: core + <source> + *: "Sort Directories" + </source> + <dest> + *: "Å Ä·irot Mapes" + </dest> + <voice> + *: "shkjirot mapes" + </voice> +</phrase> +<phrase> + id: LANG_SORT_FILE + desc: browser sorting setting + user: core + <source> + *: "Sort Files" + </source> + <dest> + *: "Å Ä·irot Failus" + </dest> + <voice> + *: "shkjirot failus" + </voice> +</phrase> +<phrase> + id: LANG_SORT_ALPHA + desc: browser sorting setting + user: core + <source> + *: "Alphabetical" + </source> + <dest> + *: "AlfabÄ“tiski" + </dest> + <voice> + *: "alfabeetiski" + </voice> +</phrase> +<phrase> + id: LANG_SORT_DATE + desc: browser sorting setting + user: core + <source> + *: "By Date" + </source> + <dest> + *: "PÄ“c Vecuma" + </dest> + <voice> + *: "peec vecuma" + </voice> +</phrase> +<phrase> + id: LANG_SORT_DATE_REVERSE + desc: browser sorting setting + user: core + <source> + *: "By Newest Date" + </source> + <dest> + *: "PÄ“c JaunÄkÄ" + </dest> + <voice> + *: "peec jaunaakaa" + </voice> +</phrase> +<phrase> + id: LANG_SORT_TYPE + desc: browser sorting setting + user: core + <source> + *: "By Type" + </source> + <dest> + *: "PÄ“c Veida" + </dest> + <voice> + *: "peec veida" + </voice> +</phrase> +<phrase> + id: LANG_FILTER + desc: setting name for dir filter + user: core + <source> + *: "Show Files" + </source> + <dest> + *: "RÄdÄ«t Failus" + </dest> + <voice> + *: "raadiit failus" + </voice> +</phrase> +<phrase> + id: LANG_FILTER_SUPPORTED + desc: show all file types supported by Rockbox + user: core + <source> + *: "Supported" + </source> + <dest> + *: "AtbalstÄ«tos" + </dest> + <voice> + *: "raadiit atbalstiitos failus" + </voice> +</phrase> +<phrase> + id: LANG_FILTER_MUSIC + desc: show only music-related files + user: core + <source> + *: "Music" + </source> + <dest> + *: "MÅ«zikas" + </dest> + <voice> + *: "raadiit tikai muuzikas failus" + </voice> +</phrase> +<phrase> + id: LANG_FOLLOW + desc: in settings_menu + user: core + <source> + *: "Follow Playlist" + </source> + <dest> + *: "Sekot Sarakstam" + </dest> + <voice> + *: "sekot sarakstam" + </voice> +</phrase> +<phrase> + id: LANG_SHOW_PATH + desc: in settings_menu + user: core + <source> + *: "Show Path" + </source> + <dest> + *: "RÄdÄ«t Ceļu" + </dest> + <voice> + *: "raadiit celju" + </voice> +</phrase> +<phrase> + id: LANG_SHOW_PATH_CURRENT + desc: in show path menu + user: core + <source> + *: "Current Directory Only" + </source> + <dest> + *: "Tikai PatreizÄ“jo Mapi" + </dest> + <voice> + *: "tikai patreizeejo mapi" + </voice> +</phrase> +<phrase> + id: LANG_DISPLAY_FULL_PATH + desc: track display options + user: core + <source> + *: "Full Path" + </source> + <dest> + *: "Pilnu Ceļu" + </dest> + <voice> + *: "pilnu celju" + </voice> +</phrase> +<phrase> + id: LANG_BUILDING_DATABASE + desc: splash database building progress + user: core + <source> + *: "Building database... %d found (OFF to return)" + iriverh100,iriverh120,iriverh300: "Building database... %d found (STOP to return)" + ipod*: "Building database... %d found (PREV to return)" + iaudiox5,iaudiom5,gigabeat*,mrobe100: "Building database... %d found (LEFT to return)" + iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Building database... %d found (PREV to return)" + gogearsa9200: "Building database... %d found (REW to return)" + archosplayer: "Building DB %d found" + </source> + <dest> + *: "Veidoju datubÄzi... %d atrastas (OFF lai turpinÄtu)" + iriverh100,iriverh120,iriverh300: "Veidoju datubÄzi... %d atrastas (STOP lai turpinÄtu)" + ipod*: "Veidoju datubÄzi... %d atrastas (PREV lai turpinÄtu)" + iaudiox5,iaudiom5,gigabeat*,mrobe100: "Veidoju datubÄzi... %d atrastas (LEFT lai turpinÄtu)" + iriverh10,iriverh10_5gb,sansae200*,sansac200*,sansafuze*,vibe500: "Veidoju datubÄzi... %d atrastas (PREV lai turpinÄtu)" + gogearsa9200: "Veidoju datubÄzi... %d atrastas (REW lai turpinÄtu)" + archosplayer: "Veidoju DB atrasts %d" + </dest> + <voice> + *: "atrasti ieraksti datubaazei" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_RAM + desc: in tag cache settings + user: core + <source> + *: none + tc_ramcache: "Load to RAM" + </source> + <dest> + *: none + tc_ramcache: "IelÄdÄ“t AtmiņÄ" + </dest> + <voice> + *: none + tc_ramcache: "ielaadeet operatiivajaa atminjaa" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_AUTOUPDATE + desc: in tag cache settings + user: core + <source> + *: "Auto Update" + </source> + <dest> + *: "Atjaunot AutomÄtiski" + </dest> + <voice> + *: "atjaunot automaatiski" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_FORCE_UPDATE + desc: in tag cache settings + user: core + <source> + *: "Initialize Now" + </source> + <dest> + *: "InicializÄ“t Tagad" + </dest> + <voice> + *: "inicializeet tagad" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_UPDATE + desc: in tag cache settings + user: core + <source> + *: "Update Now" + </source> + <dest> + *: "Atjaunot Tagad" + </dest> + <voice> + *: "atjaunot tagad" + </voice> +</phrase> +<phrase> + id: LANG_RUNTIMEDB_ACTIVE + desc: in settings_menu. + user: core + <source> + *: "Gather Runtime Data" + </source> + <dest> + *: "KrÄt Statistiku" + </dest> + <voice> + *: "kraat statistiku" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_EXPORT + desc: in tag cache settings + user: core + <source> + *: "Export Modifications" + </source> + <dest> + *: "EksportÄ“t Izmaiņas" + </dest> + <voice> + *: "eksporteet izmainjas" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_IMPORT + desc: in tag cache settings + user: core + <source> + *: "Import Modifications" + </source> + <dest> + *: "ImportÄ“t Izmaiņas" + </dest> + <voice> + *: "importeet izmainjas" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_FORCE_UPDATE_SPLASH + desc: in tag cache settings + user: core + <source> + *: "Updating in background" + </source> + <dest> + *: "Atjaunina fonÄ" + </dest> + <voice> + *: "atjaunina fonaa" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_INIT + desc: while initializing tagcache on boot + user: core + <source> + *: "Committing database" + </source> + <dest> + *: "Palaiž datubÄzi" + </dest> + <voice> + *: "palaizh datubaazi" + </voice> +</phrase> +<phrase> + id: LANG_TAGCACHE_BUSY + desc: when trying to shutdown and tagcache is committing + user: core + <source> + *: "Database is not ready" + </source> + <dest> + *: "DatubÄze vÄ“l darbojas" + </dest> + <voice> + *: "datubaaze veel darbojas" + </voice> +</phrase> +<phrase> + id: LANG_TAGNAVI_ALL_TRACKS + desc: "<All tracks>" entry in tag browser + user: core + <source> + *: "<All tracks>" + </source> + <dest> + *: "<Visas dziesmas>" + </dest> + <voice> + *: "visas dziesmas" + </voice> +</phrase> +<phrase> + id: LANG_DISPLAY + desc: in settings_menu() + user: core + <source> + *: "Display" + </source> + <dest> + *: "AttÄ“ls" + </dest> + <voice> + *: "atteels" + </voice> +</phrase> +<phrase> + id: LANG_CUSTOM_FONT + desc: in setting_menu() + user: core + <source> + *: none + lcd_bitmap: "Font" + </source> + <dest> + *: none + lcd_bitmap: "Fonti" + </dest> + <voice> + *: none + lcd_bitmap: "fonti" + </voice> +</phrase> +<phrase> + id: LANG_WHILE_PLAYING + desc: in settings_menu() + user: core + <source> + *: "While Playing Screen" + </source> + <dest> + *: "AtskaņoÅ¡anas EkrÄns" + </dest> + <voice> + *: "atskanjoshanas ekraans" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_WHILE_PLAYING + desc: in settings_menu() + user: core + <source> + *: none + remote: "Remote While Playing Screen" + </source> + <dest> + *: none + remote: "Pults AtskaņoÅ¡anas EkrÄns" + </dest> + <voice> + *: none + remote: "pults atskanjoshanas ekraans" + </voice> +</phrase> +<phrase> + id: LANG_LCD_MENU + desc: in the display sub menu + user: core + <source> + *: "LCD Settings" + </source> + <dest> + *: "EkrÄna UzstÄdÄ«jumi" + </dest> + <voice> + *: "ekraana uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_BACKLIGHT + desc: in settings_menu + user: core + <source> + *: "Backlight" + </source> + <dest> + *: "Apgaismojums" + </dest> + <voice> + *: "apgaismojums" + </voice> +</phrase> +<phrase> + id: LANG_BACKLIGHT_ON_WHEN_CHARGING + desc: in display_settings_menu, backlight timeout with charger connected + user: core + <source> + *: none + charging: "Backlight (While Plugged In)" + </source> + <dest> + *: none + charging: "Apgaismojums (LÄdÄ“jot)" + </dest> + <voice> + *: none + charging: "apgaismojums laadeeshanas laikaa" + </voice> +</phrase> +<phrase> + id: LANG_BACKLIGHT_ON_BUTTON_HOLD + desc: in lcd settings + user: core + <source> + *: none + hold_button: "Backlight on Hold" + </source> + <dest> + *: none + hold_button: "Apgaismojums kad Hold" + </dest> + <voice> + *: none + hold_button: "apgaismojums ar noblokjeetiem taustinjiem" + </voice> +</phrase> +<phrase> + id: LANG_CAPTION_BACKLIGHT + desc: in settings_menu + user: core + <source> + *: "Caption Backlight" + </source> + <dest> + *: "Nosaukuma Apgaismojums" + </dest> + <voice> + *: "nosaukuma apgaismojums" + </voice> +</phrase> +<phrase> + id: LANG_BACKLIGHT_FADE_IN + desc: in settings_menu + user: core + <source> + *: none + backlight_fade*: "Backlight Fade In" + </source> + <dest> + *: none + backlight_fade*: "Apgaismojuma iesl.laiks" + </dest> + <voice> + *: none + backlight_fade*: "apgaismojuma iesleegshanaas laiks" + </voice> +</phrase> +<phrase> + id: LANG_BACKLIGHT_FADE_OUT + desc: in settings_menu + user: core + <source> + *: none + backlight_fade*: "Backlight Fade Out" + </source> + <dest> + *: none + backlight_fade*: "Apgaismojuma izsl.laiks" + </dest> + <voice> + *: none + backlight_fade*: "apgaismojuma izsleegshanaas laiks" + </voice> +</phrase> +<phrase> + id: LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS + desc: Backlight behaviour setting + user: core + <source> + *: "First Buttonpress Enables Backlight Only" + </source> + <dest> + *: "Pirmais Spiediens IeslÄ“dz Tikai Apgaismojumu" + </dest> + <voice> + *: "pirmais spiediens Iesleedz tikai apgaismojumu" + </voice> +</phrase> +<phrase> + id: LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF + desc: In display settings, time to switch LCD chip into power saving state + user: core + <source> + *: none + lcd_sleep: "Sleep (After Backlight Off)" + </source> + <dest> + *: none + lcd_sleep: "EkrÄna IzslÄ“gÅ¡anas Laiks" + </dest> + <voice> + *: none + lcd_sleep: "ekraana izsleegshanas laiks" + </voice> +</phrase> +<phrase> + id: LANG_NEVER + desc: in lcd settings + user: core + <source> + *: none + lcd_sleep: "Never" + </source> + <dest> + *: none + lcd_sleep: "Nekad" + </dest> + <voice> + *: none + lcd_sleep: "nekad" + </voice> +</phrase> +<phrase> + id: LANG_BRIGHTNESS + desc: in settings_menu + user: core + <source> + *: none + backlight_brightness: "Brightness" + </source> + <dest> + *: none + backlight_brightness: "Spilgtums" + </dest> + <voice> + *: none + backlight_brightness: "spilgtums" + </voice> +</phrase> +<phrase> + id: LANG_CONTRAST + desc: in settings_menu + user: core + <source> + *: "Contrast" + </source> + <dest> + *: "Kontrasts" + </dest> + <voice> + *: "kontrasts" + </voice> +</phrase> +<phrase> + id: LANG_INVERT + desc: in settings_menu + user: core + <source> + *: none + lcd_invert,remote_lcd_invert: "LCD Mode" + </source> + <dest> + *: none + lcd_invert,remote_lcd_invert: "EkrÄna Režīms" + </dest> + <voice> + *: none + lcd_invert,remote_lcd_invert: "ekraana rezhiims" + </voice> +</phrase> +<phrase> + id: LANG_INVERT_LCD_INVERSE + desc: in settings_menu + user: core + <source> + *: none + lcd_invert,remote_lcd_invert: "Inverse" + </source> + <dest> + *: none + lcd_invert,remote_lcd_invert: "NegatÄ«vs" + </dest> + <voice> + *: none + lcd_invert,remote_lcd_invert: "negatiivs" + </voice> +</phrase> +<phrase> + id: LANG_FLIP_DISPLAY + desc: in settings_menu, option to turn display+buttos by 180 degrees + user: core + <source> + *: none + lcd_bitmap: "Upside Down" + </source> + <dest> + *: none + lcd_bitmap: "KÄjÄm GaisÄ" + </dest> + <voice> + *: none + lcd_bitmap: "kaajaam gaisaa" + </voice> +</phrase> +<phrase> + id: LANG_INVERT_CURSOR + desc: in settings_menu + user: core + <source> + *: none + lcd_bitmap: "Line Selector Type" + </source> + <dest> + *: none + lcd_bitmap: "LÄ«nija" + </dest> + <voice> + *: none + lcd_bitmap: "liinija" + </voice> +</phrase> +<phrase> + id: LANG_INVERT_CURSOR_POINTER + desc: in settings_menu + user: core + <source> + *: none + lcd_bitmap: "Pointer" + </source> + <dest> + *: none + lcd_bitmap: "Kursors" + </dest> + <voice> + *: none + lcd_bitmap: "kursors" + </voice> +</phrase> +<phrase> + id: LANG_INVERT_CURSOR_BAR + desc: in settings_menu + user: core + <source> + *: none + lcd_bitmap: "Bar (Inverse)" + </source> + <dest> + *: none + lcd_bitmap: "Rinda (ApvÄ“rsta)" + </dest> + <voice> + *: none + lcd_bitmap: "apveersta rinda" + </voice> +</phrase> +<phrase> + id: LANG_CLEAR_BACKDROP + desc: text for LCD settings menu + user: core + <source> + *: none + lcd_non-mono: "Clear Backdrop" + </source> + <dest> + *: none + lcd_non-mono: "NovÄkt Fonu" + </dest> + <voice> + *: none + lcd_non-mono: "novaakt fonu" + </voice> +</phrase> +<phrase> + id: LANG_BACKGROUND_COLOR + desc: menu entry to set the background color + user: core + <source> + *: none + lcd_color: "Background Colour" + </source> + <dest> + *: none + lcd_color: "Fona KrÄsa" + </dest> + <voice> + *: none + lcd_color: "fona kraasa" + </voice> +</phrase> +<phrase> + id: LANG_FOREGROUND_COLOR + desc: menu entry to set the foreground color + user: core + <source> + *: none + lcd_color: "Foreground Colour" + </source> + <dest> + *: none + lcd_color: "PriekÅ¡plÄna KrÄsa" + </dest> + <voice> + *: none + lcd_color: "priekshplaana kraasa" + </voice> +</phrase> +<phrase> + id: LANG_RESET_COLORS + desc: menu + user: core + <source> + *: none + lcd_color: "Reset Colours" + </source> + <dest> + *: none + lcd_color: "NoklusÄ“tÄs KrÄsas" + </dest> + <voice> + *: none + lcd_color: "nokluseetaas kraasas" + </voice> +</phrase> +<phrase> + id: LANG_COLOR_RGB_LABELS + desc: what to show for the 'R' 'G' 'B' ONE LETTER EACH + user: core + <source> + *: none + lcd_color: "RGB" + </source> + <dest> + *: none + lcd_color: "SaZaZi" + </dest> + <voice> + *: none + lcd_color: "" + </voice> +</phrase> +<phrase> + id: LANG_COLOR_RGB_VALUE + desc: in color screen + user: core + <source> + *: none + lcd_color: "RGB: %02X%02X%02X" + </source> + <dest> + *: none + lcd_color: "SaZaZi: %02X%02X%02X" + </dest> + <voice> + *: none + lcd_color: "" + </voice> +</phrase> +<phrase> + id: LANG_COLOR_UNACCEPTABLE + desc: splash when user selects an invalid colour + user: core + <source> + *: none + lcd_color: "Invalid colour" + </source> + <dest> + *: none + lcd_color: "NederÄ«ga KrÄsa" + </dest> + <voice> + *: none + lcd_color: "" + </voice> +</phrase> +<phrase> + id: LANG_LCD_REMOTE_MENU + desc: in the display sub menu + user: core + <source> + *: none + remote: "Remote-LCD Settings" + </source> + <dest> + *: none + remote: "Pults EkrÄna UzstÄdÄ«jumi" + </dest> + <voice> + *: none + remote: "pults ekraana uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_REDUCE_TICKING + desc: in remote lcd settings menu + user: core + <source> + *: none + remote_ticking: "Reduce Ticking" + </source> + <dest> + *: none + remote_ticking: "SamazinÄt Tikšķi" + </dest> + <voice> + *: none + remote_ticking: "samazinaat tikshkji" + </voice> +</phrase> +<phrase> + id: LANG_SHOW_ICONS + desc: in settings_menu + user: core + <source> + *: "Show Icons" + </source> + <dest> + *: "RÄdÄ«t Ikonas" + </dest> + <voice> + *: "raadiit ikonas" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_MENU + desc: in display_settings_menu() + user: core + <source> + *: "Scrolling" + </source> + <dest> + *: "Rullēšana" + </dest> + <voice> + *: "rulleeshana" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL + desc: in settings_menu + user: core + <source> + *: "Scroll Speed Setting Example" + </source> + <dest> + *: "Rullēšanas Ä€truma PiemÄ“rs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_SPEED + desc: in display_settings_menu() + user: core + <source> + *: "Scroll Speed" + </source> + <dest> + *: "Rullēšanas Ä€trums" + </dest> + <voice> + *: "rulleeshanas aatrums" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_DELAY + desc: Delay before scrolling + user: core + <source> + *: "Scroll Start Delay" + </source> + <dest> + *: "Rullēšanas Aizture" + </dest> + <voice> + *: "rulleeshanas aizture" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_STEP + desc: Pixels to advance per scroll + user: core + <source> + *: "Scroll Step Size" + </source> + <dest> + *: "Rullēšanas Solis" + </dest> + <voice> + *: "rulleeshanas solis" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_STEP_EXAMPLE + desc: Pixels to advance per scroll + user: core + <source> + *: "Scroll Step Size Setting Example Text" + </source> + <dest> + *: "Rullēšanas Soļa PiemÄ“rs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_BIDIR_SCROLL + desc: Bidirectional scroll limit + user: core + <source> + *: "Bidirectional Scroll Limit" + </source> + <dest> + *: "AbpusÄ“jas Rullēšanas Limits" + </dest> + <voice> + *: "abpuseejas rulleeshanas limits" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_SCROLL_SETS + desc: "Remote Scrolling Options" Submenu in "Scrolling Options" menu + user: core + <source> + *: none + remote: "Remote Scrolling Options" + </source> + <dest> + *: none + remote: "Pults Rullēšanas Opcijas" + </dest> + <voice> + *: none + remote: "pults rulleeshanas opcijas" + </voice> +</phrase> +<phrase> + id: LANG_SCREEN_SCROLL_VIEW + desc: should lines scroll out of the screen + user: core + <source> + *: none + lcd_bitmap: "Screen Scrolls Out Of View" + </source> + <dest> + *: none + lcd_bitmap: "Teksts IzrullÄ“jas Ä€rpus EkrÄna" + </dest> + <voice> + *: none + lcd_bitmap: "teksts izrulleejas aarpus ekraana" + </voice> +</phrase> +<phrase> + id: LANG_SCREEN_SCROLL_STEP + desc: Pixels to advance per Screen scroll + user: core + <source> + *: none + lcd_bitmap: "Screen Scroll Step Size" + </source> + <dest> + *: none + lcd_bitmap: "EkrÄna Rullēšanas Solis" + </dest> + <voice> + *: none + lcd_bitmap: "ekraana rulleeshanas solis" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_PAGINATED + desc: jump to new page when scrolling + user: core + <source> + *: "Paged Scrolling" + </source> + <dest> + *: "RullÄ“t Lapas" + </dest> + <voice> + *: "rulleet lapas" + </voice> +</phrase> +<phrase> + id: LANG_LISTACCEL_START_DELAY + desc: Delay before list starts accelerating + user: core + <source> + *: "List Acceleration Start Delay" + wheel_acceleration: none + </source> + <dest> + *: "Saraksta Rullēšanas Aizture" + wheel_acceleration: none + </dest> + <voice> + *: "saraksta rulleeshanas aizture" + wheel_acceleration: none + </voice> +</phrase> +<phrase> + id: LANG_LISTACCEL_ACCEL_SPEED + desc: list acceleration speed + user: core + <source> + *: "List Acceleration Speed" + wheel_acceleration: none + </source> + <dest> + *: "Saraksta PaÄtrinÄjums" + wheel_acceleration: none + </dest> + <voice> + *: "saraksta paaatrinaajums" + wheel_acceleration: none + </voice> +</phrase> +<phrase> + id: LANG_BARS_MENU + desc: in the display sub menu + user: core + <source> + *: none + lcd_bitmap: "Status-/Scrollbar" + </source> + <dest> + *: none + lcd_bitmap: "Statusa-/Rulljosla" + </dest> + <voice> + *: none + lcd_bitmap: "statusa rulljosla" + </voice> +</phrase> +<phrase> + id: LANG_SCROLL_BAR + desc: display menu, F3 substitute + user: core + <source> + *: none + lcd_bitmap: "Scroll Bar" + </source> + <dest> + *: none + lcd_bitmap: "Rulljosla" + </dest> + <voice> + *: none + lcd_bitmap: "rulljosla" + </voice> +</phrase> +<phrase> + id: LANG_STATUS_BAR + desc: display menu, F3 substitute + user: core + <source> + *: none + lcd_bitmap: "Status Bar" + </source> + <dest> + *: none + lcd_bitmap: "Statusa Josla" + </dest> + <voice> + *: none + lcd_bitmap: "statusa josla" + </voice> +</phrase> +<phrase> + id: LANG_BUTTON_BAR + desc: in settings menu + user: core + <source> + *: none + recorder_pad: "Button Bar" + </source> + <dest> + *: none + recorder_pad: "Pogu Josla" + </dest> + <voice> + *: none + recorder_pad: "pogu josla" + </voice> +</phrase> +<phrase> + id: LANG_VOLUME_DISPLAY + desc: Volume type title + user: core + <source> + *: none + lcd_bitmap: "Volume Display" + </source> + <dest> + *: none + lcd_bitmap: "Skaļuma AttÄ“loÅ¡ana" + </dest> + <voice> + *: none + lcd_bitmap: "skaljuma atteeloshana" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_DISPLAY + desc: Battery type title + user: core + <source> + *: none + lcd_bitmap: "Battery Display" + </source> + <dest> + *: none + lcd_bitmap: "Batterijas AttÄ“loÅ¡ana" + </dest> + <voice> + *: none + lcd_bitmap: "baterijas atteeloshana" + </voice> +</phrase> +<phrase> + id: LANG_DISPLAY_GRAPHIC + desc: Label for type of icon display + user: core + <source> + *: none + lcd_bitmap: "Graphic" + </source> + <dest> + *: none + lcd_bitmap: "Grafiski" + </dest> + <voice> + *: none + lcd_bitmap: "grafiski" + </voice> +</phrase> +<phrase> + id: LANG_DISPLAY_NUMERIC + desc: Label for type of icon display + user: core + <source> + *: none + lcd_bitmap: "Numeric" + </source> + <dest> + *: none + lcd_bitmap: "Numeriski" + </dest> + <voice> + *: none + lcd_bitmap: "numeriski" + </voice> +</phrase> +<phrase> + id: LANG_PM_MENU + desc: in the display menu + user: core + <source> + *: "Peak Meter" + masd: none + </source> + <dest> + *: "LÄ«meņa Indikators" + masd: none + </dest> + <voice> + *: "liimenja indikators" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_CLIP_HOLD + desc: in the peak meter menu + user: core + <source> + *: "Clip Hold Time" + masd: none + </source> + <dest> + *: "Kropļojuma Aizture" + masd: none + </dest> + <voice> + *: "kropljojuma indikaacijas aizture" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_PEAK_HOLD + desc: in the peak meter menu + user: core + <source> + *: "Peak Hold Time" + masd: none + </source> + <dest> + *: "Pīķa Aiztures" + masd: none + </dest> + <voice> + *: "piikja indikaacijas aizture" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_ETERNAL + desc: in the peak meter menu + user: core + <source> + *: "Eternal" + masd: none + </source> + <dest> + *: "Ä€rÄ“js" + masd: none + </dest> + <voice> + *: "aareejs" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_RELEASE + desc: in the peak meter menu + user: core + <source> + *: "Peak Release" + masd: none + </source> + <dest> + *: "Pīķa AtlaiÅ¡ana" + masd: none + </dest> + <voice> + *: "piikja indikaacijas atlaishana" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_SCALE + desc: in the peak meter menu + user: core + <source> + *: "Scale" + masd: none + </source> + <dest> + *: "Skala" + masd: none + </dest> + <voice> + *: "skala" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_DBFS + desc: in the peak meter menu + user: core + <source> + *: "Logarithmic (dB)" + masd: none + </source> + <dest> + *: "LogaritmiskÄ (dB)" + masd: none + </dest> + <voice> + *: "logaritmiskaa decibelu" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_LINEAR + desc: in the peak meter menu + user: core + <source> + *: "Linear (%)" + masd: none + </source> + <dest> + *: "LineÄrÄ (%)" + masd: none + </dest> + <voice> + *: "lineaaraa procentu" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_MIN + desc: in the peak meter menu + user: core + <source> + *: "Minimum Of Range" + masd: none + </source> + <dest> + *: "Skalas SÄkums" + masd: none + </dest> + <voice> + *: "skalas saakums" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_PM_MAX + desc: in the peak meter menu + user: core + <source> + *: "Maximum Of Range" + masd: none + </source> + <dest> + *: "Skalas Beigas" + masd: none + </dest> + <voice> + *: "skalas beigas" + masd: none + </voice> +</phrase> +<phrase> + id: LANG_DEFAULT_CODEPAGE + desc: default encoding used with id3 tags + user: core + <source> + *: "Default Codepage" + </source> + <dest> + *: "NoklusÄ“tais KodÄ“jums" + </dest> + <voice> + *: "nokluseetais kodeejums" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_LATIN1 + desc: in codepage setting menu + user: core + <source> + *: "Latin1 (ISO-8859-1)" + </source> + <dest> + *: "Latīņu1 (ISO-8859-1)" + </dest> + <voice> + *: "latiinju viens" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_GREEK + desc: in codepage setting menu + user: core + <source> + *: "Greek (ISO-8859-7)" + </source> + <dest> + *: "GrieÄ·u (ISO-8859-7)" + </dest> + <voice> + *: "griekju" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_HEBREW + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Hebrew (ISO-8859-8)" + </source> + <dest> + *: none + lcd_bitmap: "Ebreju (ISO-8859-8)" + </dest> + <voice> + *: none + lcd_bitmap: "ebreju" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_CYRILLIC + desc: in codepage setting menu + user: core + <source> + *: "Cyrillic (CP1251)" + </source> + <dest> + *: "Kirilica (CP1251)" + </dest> + <voice> + *: "kirilica" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_THAI + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Thai (ISO-8859-11)" + </source> + <dest> + *: none + lcd_bitmap: "Tai (ISO-8859-11)" + </dest> + <voice> + *: none + lcd_bitmap: "tai" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_ARABIC + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Arabic (CP1256)" + </source> + <dest> + *: none + lcd_bitmap: "ArÄbu (CP1256)" + </dest> + <voice> + *: none + lcd_bitmap: "araabu" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_TURKISH + desc: in codepage setting menu + user: core + <source> + *: "Turkish (ISO-8859-9)" + </source> + <dest> + *: "Turku (ISO-8859-9)" + </dest> + <voice> + *: "turku" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_LATIN_EXTENDED + desc: in codepage setting menu + user: core + <source> + *: "Latin Extended (ISO-8859-2)" + </source> + <dest> + *: "Latīņu PaplaÅ¡in. (ISO-8859-2)" + </dest> + <voice> + *: "latiinju paplashinaatais" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_JAPANESE + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Japanese (SJIS)" + </source> + <dest> + *: none + lcd_bitmap: "JapÄņu (SJIS)" + </dest> + <voice> + *: none + lcd_bitmap: "Japaanju" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_SIMPLIFIED + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Simp. Chinese (GB2312)" + </source> + <dest> + *: none + lcd_bitmap: "Vienk. ĶīnieÅ¡u (GB2312)" + </dest> + <voice> + *: none + lcd_bitmap: "vienkaarshotais kjiinieshu" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_KOREAN + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Korean (KSX1001)" + </source> + <dest> + *: none + lcd_bitmap: "KorejieÅ¡u (KSX1001)" + </dest> + <voice> + *: none + lcd_bitmap: "korejieshu" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_TRADITIONAL + desc: in codepage setting menu + user: core + <source> + *: none + lcd_bitmap: "Trad. Chinese (BIG5)" + </source> + <dest> + *: none + lcd_bitmap: "Trad. ĶīnieÅ¡u (BIG5)" + </dest> + <voice> + *: none + lcd_bitmap: "tradicionaalais kjiinieshu" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_UTF8 + desc: in codepage setting menu + user: core + <source> + *: "Unicode (UTF-8)" + </source> + <dest> + *: "Unikods (UTF-8)" + </dest> + <voice> + *: "unikods" + </voice> +</phrase> +<phrase> + id: LANG_BUTTONLIGHT_TIMEOUT + desc: in settings_menu + user: core + <source> + *: none + button_light: "Button Light Timeout" + sansafuze*,sansae200*: "Wheel Light Timeout" + </source> + <dest> + *: none + button_light: "Pogu Apgaismojums" + sansafuze*,sansae200*: "Ripuļa Apgaismojums" + </dest> + <voice> + *: none + button_light: "pogu apgaismojums" + sansafuze*,sansae200*: "ripulja apgaismojums" + </voice> +</phrase> +<phrase> + id: LANG_BUTTONLIGHT_BRIGHTNESS + desc: in settings_menu + user: core + <source> + *: none + buttonlight_brightness: "Button Light Brightness" + </source> + <dest> + *: none + buttonlight_brightness: "Pogu Spilgtums" + </dest> + <voice> + *: none + buttonlight_brightness: "pogu spilgtums" + </voice> +</phrase> +<phrase> + id: LANG_START_SCREEN + desc: in the system sub menu + user: core + <source> + *: "Start Screen" + </source> + <dest> + *: "SÄkuma Logs" + </dest> + <voice> + *: "saakuma logs" + </voice> +</phrase> +<phrase> + id: LANG_MAIN_MENU + desc: in start screen setting + user: core + <source> + *: "Main Menu" + </source> + <dest> + *: "GalvenÄ IzvÄ“lne" + </dest> + <voice> + *: "galvenaa izveelne" + </voice> +</phrase> +<phrase> + id: LANG_PREVIOUS_SCREEN + desc: in start screen setting + user: core + <source> + *: "Previous Screen" + </source> + <dest> + *: "IepriekšējÄ IzvÄ“lne" + </dest> + <voice> + *: "ieprieksheejaa izveelne" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_MENU + desc: in the system sub menu + user: core + <source> + *: "Battery" + </source> + <dest> + *: "Baterija" + </dest> + <voice> + *: "baterija" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_CAPACITY + desc: in settings_menu + user: core + <source> + *: "Battery Capacity" + </source> + <dest> + *: "IetilpÄ«ba" + </dest> + <voice> + *: "baterijas ietilpiiba" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_TYPE + desc: in battery settings + user: core + <source> + *: none + battery_types: "Battery Type" + </source> + <dest> + *: none + battery_types: "Veids" + </dest> + <voice> + *: none + battery_types: "veids" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_TYPE_ALKALINE + desc: in battery settings + user: core + <source> + *: none + battery_types: "Alkaline" + </source> + <dest> + *: none + battery_types: "SÄrma" + </dest> + <voice> + *: none + battery_types: "saarma" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_TYPE_NIMH + desc: in battery settings + user: core + <source> + *: none + battery_types: "NiMH" + </source> + <dest> + *: none + battery_types: "NiMH" + </dest> + <voice> + *: none + battery_types: "nikjelja metaalhidraata" + </voice> +</phrase> +<phrase> + id: LANG_DISK_MENU + desc: in the system sub menu + user: core + <source> + *: "Disk" + </source> + <dest> + *: "Disks" + </dest> + <voice> + *: "disks" + </voice> +</phrase> +<phrase> + id: LANG_SPINDOWN + desc: in settings_menu + user: core + <source> + *: "Disk Spindown" + flash_storage: none + </source> + <dest> + *: "Diska ApstÄdinÄÅ¡ana" + flash_storage: none + </dest> + <voice> + *: "diska apstaadinaashana" + flash_storage: none + </voice> +</phrase> +<phrase> + id: LANG_DIRCACHE_ENABLE + desc: in directory cache settings + user: core + <source> + *: none + dircache: "Directory Cache" + </source> + <dest> + *: none + dircache: "Mapju Buferis" + </dest> + <voice> + *: none + dircache: "mapju buferis" + </voice> +</phrase> +<phrase> + id: LANG_TIME_MENU + desc: in the system sub menu + user: core + <source> + *: none + rtc: "Time & Date" + </source> + <dest> + *: none + rtc: "Laiks & Datums" + </dest> + <voice> + *: none + rtc: "laiks un datums" + </voice> +</phrase> +<phrase> + id: LANG_SET_TIME + desc: in settings_menu + user: core + <source> + *: none + rtc: "Set Time/Date" + </source> + <dest> + *: none + rtc: "UzstÄdÄ«t Laiku/Datumu" + </dest> + <voice> + *: none + rtc: "uzstaadiit laiku un datumu" + </voice> +</phrase> +<phrase> + id: LANG_TIMEFORMAT + desc: select the time format of time in status bar + user: core + <source> + *: none + rtc: "Time Format" + </source> + <dest> + *: none + rtc: "Laika FormÄts" + </dest> + <voice> + *: none + rtc: "laika formaats" + </voice> +</phrase> +<phrase> + id: LANG_12_HOUR_CLOCK + desc: option for 12 hour clock + user: core + <source> + *: none + rtc: "12 Hour Clock" + </source> + <dest> + *: none + rtc: "12 Stundu Pulkstenis" + </dest> + <voice> + *: none + rtc: "divpadsmit stundu pulkstenis" + </voice> +</phrase> +<phrase> + id: LANG_24_HOUR_CLOCK + desc: option for 24 hour clock + user: core + <source> + *: none + rtc: "24 Hour Clock" + </source> + <dest> + *: none + rtc: "24 Stundu Pulkstenis" + </dest> + <voice> + *: none + rtc: "divdesmit chetru stundu pulkstenis" + </voice> +</phrase> +<phrase> + id: LANG_TIME_SET_BUTTON + desc: used in set_time() + user: core + <source> + *: none + rtc: "ON = Set" + mrobe500: "HEART = Set" + iriverh100,iriverh120,iriverh300: "NAVI = Set" + ipod*,iaudiox5,iaudiom5,iriverh10,iriverh10_5gb,sansae200*,sansac200*,gigabeat*,mrobe100,sansaclip*,sansafuze*: "SELECT = Set" + gogearsa9200: "PLAY = Set" + vibe500: "OK = Set" + mpiohd300: "ENTER = Set" + </source> + <dest> + *: none + rtc: "ON = UzstÄdÄ«t" + mrobe500: "HEART = UzstÄdÄ«t" + iriverh100,iriverh120,iriverh300: "NAVI = UzstÄdÄ«t" + ipod*,iaudiox5,iaudiom5,iriverh10,iriverh10_5gb,sansae200*,sansac200*,gigabeat*,mrobe100,sansaclip*,sansafuze*: "SELECT = UzstÄdÄ«t" + gogearsa9200: "PLAY = UzstÄdÄ«t" + vibe500: "OK = UzstÄdÄ«t" + mpiohd300: "ENTER = UzstÄdÄ«t" + </dest> + <voice> + *: none + rtc,iriverh100,iriverh120,iriverh300,iriverh10,iriverh10_5gb,iaudiox5,iaudiom5,ipod*,sansae200*,sansac200*,gigabeat*,mrobe100,gogearsa9200: "" + </voice> +</phrase> +<phrase> + id: LANG_TIME_REVERT + desc: used in set_time() + user: core + <source> + *: none + rtc: "OFF = Revert" + mrobe500: "POWER = Revert" + iriverh100,iriverh120,iriverh300: "STOP = Revert" + ipod*,sansac200*,mpiohd300: "MENU = Revert" + iaudiox5,iaudiom5: "RECORD = Revert" + iriverh10,iriverh10_5gb,sansae200*,sansafuze*: "PREV = Revert" + gigabeatfx: "POWER = Revert" + mrobe100: "DISPLAY = Revert" + gigabeats: "BACK = Revert" + gogearsa9200: "LEFT = Revert" + vibe500: "CANCEL = Revert" + </source> + <dest> + *: none + rtc: "OFF = Atcelt" + mrobe500: "POWER = Atcelt" + iriverh100,iriverh120,iriverh300: "STOP = Atcelt" + ipod*,sansac200*,mpiohd300: "MENU = Atcelt" + iaudiox5,iaudiom5: "RECORD = Atcelt" + iriverh10,iriverh10_5gb,sansae200*,sansafuze*: "PREV = Atcelt" + gigabeatfx: "POWER = Atcelt" + mrobe100: "DISPLAY = Atcelt" + gigabeats: "BACK = Atcelt" + gogearsa9200: "LEFT = Atcelt" + vibe500: "CANCEL = Atcelt" + </dest> + <voice> + *: none + rtc,iriverh100,iriverh120,iriverh300,ipod*,sansae200*,sansac200*,iaudiox5,iaudiom5,iriverh10,iriverh10_5gb,gigabeat*,mrobe100,gogearsa9200: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_SUNDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Sun" + </source> + <dest> + *: none + rtc: "Sv" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_MONDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Mon" + </source> + <dest> + *: none + rtc: "Prm" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_TUESDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Tue" + </source> + <dest> + *: none + rtc: "Otr" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_WEDNESDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Wed" + </source> + <dest> + *: none + rtc: "Tre" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_THURSDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Thu" + </source> + <dest> + *: none + rtc: "Cet" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_FRIDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Fri" + </source> + <dest> + *: none + rtc: "Pkt" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_WEEKDAY_SATURDAY + desc: Maximum 3-letter abbreviation for weekday + user: core + <source> + *: none + rtc: "Sat" + </source> + <dest> + *: none + rtc: "Sst" + </dest> + <voice> + *: none + rtc: "" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_JANUARY + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Jan" + </source> + <dest> + *: none + rtc: "Jan" + </dest> + <voice> + *: none + rtc: "janvaaris" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_FEBRUARY + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Feb" + </source> + <dest> + *: none + rtc: "Feb" + </dest> + <voice> + *: none + rtc: "februaaris" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_MARCH + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Mar" + </source> + <dest> + *: none + rtc: "Mar" + </dest> + <voice> + *: none + rtc: "marts" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_APRIL + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Apr" + </source> + <dest> + *: none + rtc: "Apr" + </dest> + <voice> + *: none + rtc: "apriilis" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_MAY + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "May" + </source> + <dest> + *: none + rtc: "Mai" + </dest> + <voice> + *: none + rtc: "maijs" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_JUNE + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Jun" + </source> + <dest> + *: none + rtc: "JÅ«n" + </dest> + <voice> + *: none + rtc: "juunijs" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_JULY + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Jul" + </source> + <dest> + *: none + rtc: "JÅ«l" + </dest> + <voice> + *: none + rtc: "juulijs" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_AUGUST + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Aug" + </source> + <dest> + *: none + rtc: "Aug" + </dest> + <voice> + *: none + rtc: "augusts" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_SEPTEMBER + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Sep" + </source> + <dest> + *: none + rtc: "Sep" + </dest> + <voice> + *: none + rtc: "septembris" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_OCTOBER + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Oct" + </source> + <dest> + *: none + rtc: "Okt" + </dest> + <voice> + *: none + rtc: "oktobris" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_NOVEMBER + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Nov" + </source> + <dest> + *: none + rtc: "Nov" + </dest> + <voice> + *: none + rtc: "novembris" + </voice> +</phrase> +<phrase> + id: LANG_MONTH_DECEMBER + desc: Maximum 3-letter abbreviation for monthname + user: core + <source> + *: none + rtc: "Dec" + </source> + <dest> + *: none + rtc: "Dec" + </dest> + <voice> + *: none + rtc: "decembris" + </voice> +</phrase> +<phrase> + id: LANG_POWEROFF_IDLE + desc: in settings_menu + user: core + <source> + *: "Idle Poweroff" + </source> + <dest> + *: "AutomÄtiskÄ IzslÄ“gÅ¡anÄs" + </dest> + <voice> + *: "automaatiskaa izsleegshanaas" + </voice> +</phrase> +<phrase> + id: LANG_SLEEP_TIMER + desc: sleep timer setting + user: core + <source> + *: "Sleep Timer" + </source> + <dest> + *: "Miega Taimeris" + </dest> + <voice> + *: "miega taimeris" + </voice> +</phrase> +<phrase> + id: LANG_LIMITS_MENU + desc: in the system sub menu + user: core + <source> + *: "Limits" + </source> + <dest> + *: "Ierobežojumi" + </dest> + <voice> + *: "ierobezhojumi" + </voice> +</phrase> +<phrase> + id: LANG_MAX_FILES_IN_DIR + desc: in settings_menu + user: core + <source> + *: "Max Entries in File Browser" + </source> + <dest> + *: "Maks. Faili PÄrlÅ«kÄ" + </dest> + <voice> + *: "maksimaalais failu skaits paarluukaa" + </voice> +</phrase> +<phrase> + id: LANG_MAX_FILES_IN_PLAYLIST + desc: in settings_menu + user: core + <source> + *: "Max Playlist Size" + </source> + <dest> + *: "Maks Saraksta IzmÄ“rs" + </dest> + <voice> + *: "maksimaalais dziesmu saraksta izmeers" + </voice> +</phrase> +<phrase> + id: LANG_CAR_ADAPTER_MODE + desc: Displayed for setting car adapter mode to on/off + user: core + <source> + *: none + charging: "Car Adapter Mode" + </source> + <dest> + *: none + charging: "Automašīnas Režīms" + </dest> + <voice> + *: none + charging: "automashiinas rezhiims" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_ALARM_MENU + desc: The name of the additional entry in the main menu for the RTC alarm mod. + user: core + <source> + *: none + alarm: "Wake-Up Alarm" + </source> + <dest> + *: none + alarm: "ModinÄtÄjs" + </dest> + <voice> + *: none + alarm: "modinaataajs" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_WAKEUP_SCREEN + desc: in alarm menu setting + user: core + <source> + *: none + alarm: "Alarm Wake up Screen" + </source> + <dest> + *: none + alarm: "ModinÄtÄja DarbÄ«ba" + </dest> + <voice> + *: none + alarm: "modinaataaja darbiiba" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_TIME + desc: The current alarm time shown in the alarm menu for the RTC alarm mod. + user: core + <source> + *: none + alarm: "Alarm Time:" + </source> + <dest> + *: none + alarm: "ModinÄtÄja laiks:" + </dest> + <voice> + *: none + alarm: "" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_TIME_TO_GO + desc: The time until the alarm will go off shown in the alarm menu for the RTC alarm mod. + user: core + <source> + *: none + alarm: "Waking Up In %d:%02d" + </source> + <dest> + *: none + alarm: "PamoÅ¡anÄs %d:%02d" + </dest> + <voice> + *: none + alarm: "pamoshanaas" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_SHUTDOWN + desc: The text that tells the user that the alarm time is ok and the device shuts off (for the RTC alarm mod). + user: core + <source> + *: none + alarm: "Alarm Set" + </source> + <dest> + *: none + alarm: "ModinÄtÄjs IeslÄ“gts" + </dest> + <voice> + *: none + alarm: "modinaataajs ir iesleegts" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_ERROR + desc: The text that tells that the time is incorrect (for the RTC alarm mod). + user: core + <source> + *: none + alarm: "Alarm Time Is Too Soon!" + </source> + <dest> + *: none + alarm: "Laiks ir pÄrÄk drÄ«z!" + </dest> + <voice> + *: none + alarm: "modinaashanas laiks ir paaraak driiz!" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_KEYS + desc: Shown key functions in alarm menu (for the RTC alarm mod). + user: core + <source> + *: none + alarm: "PLAY=Set OFF=Cancel" + ipod*: "SELECT=Set MENU=Cancel" + iriverh10,iriverh10_5gb: "SELECT=Set PREV=Cancel" + gigabeats: "SELECT=Set POWER=Cancel" + vibe500: "OK=Set C=Cancel" + mpiohd300: "ENTER=Set MENU=Cancel" + </source> + <dest> + *: none + alarm: "PLAY=Uzst OFF=Atteikties" + ipod*: "SELECT=Uzst MENU=Atteikties" + iriverh10,iriverh10_5gb: "SELECT=Uzst PREV=Atteikties" + gigabeats: "SELECT=Uzst POWER=Atteikties" + vibe500: "OK=Uzst C=Atteikties" + mpiohd300: "ENTER=Uzst MENU=Atteikties" + </dest> + <voice> + *: none + alarm,ipod*: "" + </voice> +</phrase> +<phrase> + id: LANG_ALARM_MOD_DISABLE + desc: Announce that the RTC alarm has been turned off + user: core + <source> + *: none + alarm: "Alarm Disabled" + </source> + <dest> + *: none + alarm: "ModinÄtÄjs IzslÄ“gts" + </dest> + <voice> + *: none + alarm: "modinaataajs izsleegts" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS + desc: in general settings + user: core + <source> + *: "Bookmarking" + </source> + <dest> + *: "GrÄmatzÄ«mes" + </dest> + <voice> + *: "graamatziimes" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_AUTOCREATE + desc: prompt for user to decide to create an bookmark + user: core + <source> + *: "Bookmark on Stop" + </source> + <dest> + *: "GrÄmatzÄ«me ApstÄjoties" + </dest> + <voice> + *: "izveidot graamatziimi apstaajoties" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES + desc: Save in recent bookmarks only + user: core + <source> + *: "Yes - Recent only" + </source> + <dest> + *: "JÄ - Tikai pÄ“dÄ“jo" + </dest> + <voice> + *: "jaa tikai peedeejo" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK + desc: Save in recent bookmarks only + user: core + <source> + *: "Ask - Recent only" + </source> + <dest> + *: "JautÄt - Tikai pÄ“dÄ“jo" + </dest> + <voice> + *: "jautaat tikai peedeejo" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_AUTOLOAD + desc: prompt for user to decide to create a bookmark + user: core + <source> + *: "Load Last Bookmark" + </source> + <dest> + *: "IelÄdÄ“t PÄ“dÄ“jo GrÄmatzÄ«mi" + </dest> + <voice> + *: "ielaadeet peedeejo graamatziimi" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS + desc: Configuration option to maintain a list of recent bookmarks + user: core + <source> + *: "Maintain a List of Recent Bookmarks?" + </source> + <dest> + *: "UzturÄ“t GrÄmatzÄ«mju Sarakstu?" + </dest> + <voice> + *: "vai uztureet peedeejo graamatziimju sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY + desc: Save only on bookmark for each playlist in recent bookmarks + user: core + <source> + *: "Unique only" + </source> + <dest> + *: "Tikai unikÄlu" + </dest> + <voice> + *: "tikai unikaalu" + </voice> +</phrase> +<phrase> + id: LANG_LANGUAGE + desc: in settings_menu + user: core + <source> + *: "Language" + </source> + <dest> + *: "Valoda" + </dest> + <voice> + *: "valoda" + </voice> +</phrase> +<phrase> + id: LANG_LANGUAGE_LOADED + desc: shown when a language has been loaded from the dir browser + user: core + <source> + *: "New Language" + </source> + <dest> + *: "Valoda NomainÄ«ta" + </dest> + <voice> + *: "valoda nomainiita" + </voice> +</phrase> +<phrase> + id: LANG_VOICE + desc: root of voice menu + user: core + <source> + *: "Voice" + </source> + <dest> + *: "Balss" + </dest> + <voice> + *: "balss" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_MENU + desc: item of voice menu, enable/disable the voice UI + user: core + <source> + *: "Voice Menus" + </source> + <dest> + *: "IzrunÄt IzvÄ“lnes" + </dest> + <voice> + *: "izrunaat izveelnes" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_DIR + desc: item of voice menu, set the voice mode for directories + user: core + <source> + *: "Voice Directories" + </source> + <dest> + *: "IzrunÄt Mapes" + </dest> + <voice> + *: "izrunaat mapes" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_DIR_TALK + desc: Item of voice menu, whether to use directory .talk clips + user: core + <source> + *: "Use Directory .talk Clips" + </source> + <dest> + *: "Izmantot Mapes .talk Klipus" + </dest> + <voice> + *: "izmantot mapes .talk klipus" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_FILE + desc: item of voice menu, set the voice mode for files + user: core + <source> + *: "Voice Filenames" + </source> + <dest> + *: "IzrunÄt Failu Nosaukumus" + </dest> + <voice> + *: "izrunaat failu nosaukumus" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_FILE_TALK + desc: Item of voice menu, whether to use file .talk clips + user: core + <source> + *: "Use File .talk Clips" + </source> + <dest> + *: "Izmantot Failu .talk Klipus" + </dest> + <voice> + *: "izmantot failu .talk klipus" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_NUMBER + desc: "talkbox" mode for files+directories + user: core + <source> + *: "Numbers" + </source> + <dest> + *: "Numuri" + </dest> + <voice> + *: "numuri" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_SPELL + desc: "talkbox" mode for files+directories + user: core + <source> + *: "Spell" + </source> + <dest> + *: "IzrunÄt" + </dest> + <voice> + *: "izrunaat" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_DIR_HOVER + desc: "talkbox" mode for directories + files + user: core + <source> + *: ".talk Clip" + </source> + <dest> + *: ".talk Klips" + </dest> + <voice> + *: "talk klips" + </voice> +</phrase> +<phrase> + id: LANG_MANAGE_MENU + desc: in the main menu + user: core + <source> + *: "Manage Settings" + </source> + <dest> + *: "Rediģēt UzstÄdÄ«jumus" + </dest> + <voice> + *: "redigjeet uzstaadiijumus" + </voice> +</phrase> +<phrase> + id: LANG_CUSTOM_CFG + desc: in setting_menu() + user: core + <source> + *: "Browse .cfg Files" + </source> + <dest> + *: "AplÅ«kot .cfg Failus" + </dest> + <voice> + *: "apluukot konfiguraacijas failus" + </voice> +</phrase> +<phrase> + id: LANG_SETTINGS_LOADED + desc: Feedback shown when a .cfg file is loaded + user: core + <source> + *: "Settings Loaded" + </source> + <dest> + *: "UzstÄdÄ«jumi IelÄdÄ“ti" + </dest> + <voice> + *: "uzstaadiijumi ielaadeeti" + </voice> +</phrase> +<phrase> + id: LANG_RESET + desc: in system_settings_menu() + user: core + <source> + *: "Reset Settings" + </source> + <dest> + *: "Atgriezt NoklusÄ“jumu" + </dest> + <voice> + *: "atgriezt nokluseetos uzstaadiijumus" + </voice> +</phrase> +<phrase> + id: LANG_RESET_DONE_CLEAR + desc: visual confirmation after settings reset + user: core + <source> + *: "Cleared" + </source> + <dest> + *: "Atgriezts NoklusÄ“jums" + </dest> + <voice> + *: "atgriezti nokluseetie uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_SAVE_SETTINGS + desc: in system_settings_menu() + user: core + <source> + *: "Save .cfg File" + </source> + <dest> + *: "SaglabÄt .cfg Failu" + </dest> + <voice> + *: "saglabaat konfiguraacijas failu" + </voice> +</phrase> +<phrase> + id: LANG_SETTINGS_SAVED + desc: Feedback shown when a .cfg file is saved + user: core + <source> + *: "Settings Saved" + </source> + <dest> + *: "UzstÄdÄ«jumi SaglabÄti" + </dest> + <voice> + *: "uzstaadiijumi saglabaati" + </voice> +</phrase> +<phrase> + id: LANG_SAVE_THEME + desc: save a theme file + user: core + <source> + *: "Save Theme Settings" + </source> + <dest> + *: "SaglabÄt TÄ“mas UzstÄdÄ«jumus" + </dest> + <voice> + *: "saglabaat teemas uzstaadiijumus" + </voice> +</phrase> +<phrase> + id: LANG_CUSTOM_THEME + desc: in the main menu + user: core + <source> + *: "Browse Theme Files" + </source> + <dest> + *: "AplÅ«kot TÄ“mu Failus" + </dest> + <voice> + *: "apluukot teemu failus" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_SETTINGS + desc: in the main menu + user: core + <source> + *: none + recording: "Recording Settings" + </source> + <dest> + *: none + recording: "Ieraksta UzstÄdÄ«jumi" + </dest> + <voice> + *: none + recording: "ieraksta uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_FM_MENU + desc: fm menu title + user: core + <source> + *: none + radio: "FM Radio Menu" + </source> + <dest> + *: none + radio: "FM Radio IzvÄ“lne" + </dest> + <voice> + *: none + radio: "ef em radio izveelne" + </voice> +</phrase> +<phrase> + id: LANG_FM_NO_PRESETS + desc: error when preset list is empty + user: core + <source> + *: none + radio: "No presets" + </source> + <dest> + *: none + radio: "Nav Staciju" + </dest> + <voice> + *: none + radio: "nav saglabaatu radiostaciju" + </voice> +</phrase> +<phrase> + id: LANG_FM_ADD_PRESET + desc: in radio menu + user: core + <source> + *: none + radio: "Add Preset" + </source> + <dest> + *: none + radio: "Pievienot Staciju" + </dest> + <voice> + *: none + radio: "pievienot radiostaciju" + </voice> +</phrase> +<phrase> + id: LANG_FM_EDIT_PRESET + desc: in radio screen + user: core + <source> + *: none + radio: "Edit Preset" + </source> + <dest> + *: none + radio: "Labot Staciju" + </dest> + <voice> + *: none + radio: "labot radiostaciju" + </voice> +</phrase> +<phrase> + id: LANG_FM_DELETE_PRESET + desc: in radio screen + user: core + <source> + *: none + radio: "Remove Preset" + </source> + <dest> + *: none + radio: "IzdzÄ“st Staciju" + </dest> + <voice> + *: none + radio: "izdzeest radiostaciju" + </voice> +</phrase> +<phrase> + id: LANG_FM_PRESET_SAVE_FAILED + desc: in radio screen + user: core + <source> + *: none + radio: "Preset Save Failed" + </source> + <dest> + *: none + radio: "Staciju NeizdevÄs SaglabÄt" + </dest> + <voice> + *: none + radio: "radiostaciju neizdevaas saglabaat" + </voice> +</phrase> +<phrase> + id: LANG_FM_NO_FREE_PRESETS + desc: in radio screen + user: core + <source> + *: none + radio: "The Preset List is Full" + </source> + <dest> + *: none + radio: "Saraksts Ir Pilns" + </dest> + <voice> + *: none + radio: "saraksts ir pilns" + </voice> +</phrase> +<phrase> + id: LANG_BUTTONBAR_MENU + desc: in button bar + user: core + <source> + *: none + radio_screen_button_bar: "Menu" + </source> + <dest> + *: none + radio_screen_button_bar: "IzvÄ“lne" + </dest> + <voice> + *: none + radio_screen_button_bar: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_BUTTONBAR_EXIT + desc: in radio screen + user: core + <source> + *: none + radio_screen_button_bar: "Exit" + </source> + <dest> + *: none + radio_screen_button_bar: "Iziet" + </dest> + <voice> + *: none + radio_screen_button_bar: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_BUTTONBAR_ACTION + desc: in radio screen + user: core + <source> + *: none + radio_screen_button_bar: "Action" + </source> + <dest> + *: none + radio_screen_button_bar: "DarbÄ«ba" + </dest> + <voice> + *: none + radio_screen_button_bar: "" + </voice> +</phrase> +<phrase> + id: LANG_PRESET + desc: in button bar and radio screen / menu + user: core + <source> + *: none + radio: "Preset" + </source> + <dest> + *: none + radio: "Stacija" + </dest> + <voice> + *: none + radio: "radiostacija" + </voice> +</phrase> +<phrase> + id: LANG_FM_BUTTONBAR_ADD + desc: in radio screen + user: core + <source> + *: none + radio_screen_button_bar: "Add" + </source> + <dest> + *: none + radio_screen_button_bar: "Pievienot" + </dest> + <voice> + *: none + radio_screen_button_bar: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_BUTTONBAR_RECORD + desc: in radio screen + user: core + <source> + *: none + radio_screen_button_bar: "Record" + </source> + <dest> + *: none + radio_screen_button_bar: "IerakstÄ«t" + </dest> + <voice> + *: none + radio_screen_button_bar: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_MONO_MODE + desc: in radio screen + user: core + <source> + *: none + radio: "Force Mono" + </source> + <dest> + *: none + radio: "IeslÄ“gt Mono" + </dest> + <voice> + *: none + radio: "iesleegt mono" + </voice> +</phrase> +<phrase> + id: LANG_FM_FREEZE + desc: splash screen during freeze in radio mode + user: core + <source> + *: none + radio: "Screen frozen!" + </source> + <dest> + *: none + radio: "EkrÄns Sastindzis!" + </dest> + <voice> + *: none + radio: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_SCAN_PRESETS + desc: in radio menu + user: core + <source> + *: none + radio: "Auto-Scan Presets" + </source> + <dest> + *: none + radio: "NoskanÄ“t Stacijas" + </dest> + <voice> + *: none + radio: "noskaneet radiostacijas" + </voice> +</phrase> +<phrase> + id: LANG_FM_CLEAR_PRESETS + desc: confirmation if presets can be cleared + user: core + <source> + *: none + radio: "Clear Current Presets?" + </source> + <dest> + *: none + radio: "IzdzÄ“st EsoÅ¡Äs Stacijas?" + </dest> + <voice> + *: none + radio: "vai izdzeest esoshaas radiostacijas" + </voice> +</phrase> +<phrase> + id: LANG_FM_SCANNING + desc: during auto scan + user: core + <source> + *: none + radio: "Scanning %d.%02d MHz" + </source> + <dest> + *: none + radio: "SkanÄ“ %d.%02d MHz" + </dest> + <voice> + *: none + radio: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_DEFAULT_PRESET_NAME + desc: default preset name for auto scan mode + user: core + <source> + *: none + radio: "%d.%02d MHz" + </source> + <dest> + *: none + radio: "%d.%02d MHz" + </dest> + <voice> + *: none + radio: "" + </voice> +</phrase> +<phrase> + id: LANG_RADIO_SCAN_MODE + desc: in radio screen / menu + user: core + <source> + *: none + radio: "Scan" + </source> + <dest> + *: none + radio: "SkanÄ“t" + </dest> + <voice> + *: none + radio: "skaneet" + </voice> +</phrase> +<phrase> + id: LANG_FM_PRESET_LOAD + desc: load preset list in fm radio + user: core + <source> + *: none + radio: "Load Preset List" + </source> + <dest> + *: none + radio: "IelÄdÄ“t Stacijas" + </dest> + <voice> + *: none + radio: "ielaadeet radiostacijas" + </voice> +</phrase> +<phrase> + id: LANG_FM_PRESET_SAVE + desc: Save preset list in fm radio + user: core + <source> + *: none + radio: "Save Preset List" + </source> + <dest> + *: none + radio: "SaglabÄt Stacijas" + </dest> + <voice> + *: none + radio: "saglabaat radiostacijas" + </voice> +</phrase> +<phrase> + id: LANG_FM_PRESET_CLEAR + desc: clear preset list in fm radio + user: core + <source> + *: none + radio: "Clear Preset List" + </source> + <dest> + *: none + radio: "IzdzÄ“st Stacijas" + </dest> + <voice> + *: none + radio: "izdzeest radiostacijas" + </voice> +</phrase> +<phrase> + id: LANG_FMR + desc: Used when you need to say Preset List, also voiced + user: core + <source> + *: none + radio: "Preset List" + </source> + <dest> + *: none + radio: "Staciju Saraksts" + </dest> + <voice> + *: none + radio: "radiostaciju saraksts" + </voice> +</phrase> +<phrase> + id: LANG_FM_FIRST_AUTOSCAN + desc: When you run the radio without an fmr file in settings + user: core + <source> + *: none + radio: "No settings found. Autoscan?" + </source> + <dest> + *: none + radio: "Nav UzstÄdÄ«jumu. SkanÄ“t?" + </dest> + <voice> + *: none + radio: "nav uzstaadiijumu. vai skaneet" + </voice> +</phrase> +<phrase> + id: LANG_FM_SAVE_CHANGES + desc: deprecated + user: core + <source> + *: none + radio: "" + </source> + <dest> + *: none + radio: "" + </dest> + <voice> + *: none + radio: "" + </voice> +</phrase> +<phrase> + id: LANG_FM_REGION + desc: fm tuner region setting + user: core + <source> + *: none + radio: "Region" + </source> + <dest> + *: none + radio: "ReÄ£ions" + </dest> + <voice> + *: none + radio: "regjions" + </voice> +</phrase> +<phrase> + id: LANG_FM_EUROPE + desc: fm tuner region europe + user: core + <source> + *: none + radio: "Europe" + </source> + <dest> + *: none + radio: "Eiropa" + </dest> + <voice> + *: none + radio: "eiropa" + </voice> +</phrase> +<phrase> + id: LANG_FM_US + desc: fm region us / canada + user: core + <source> + *: none + radio: "US / Canada" + </source> + <dest> + *: none + radio: "ASV / KanÄda" + </dest> + <voice> + *: none + radio: "asv un kanaada" + </voice> +</phrase> +<phrase> + id: LANG_FM_JAPAN + desc: fm region japan + user: core + <source> + *: none + radio: "Japan" + </source> + <dest> + *: none + radio: "JapÄna" + </dest> + <voice> + *: none + radio: "japaana" + </voice> +</phrase> +<phrase> + id: LANG_FM_KOREA + desc: fm region korea + user: core + <source> + *: none + radio: "Korea" + </source> + <dest> + *: none + radio: "Koreja" + </dest> + <voice> + *: none + radio: "koreja" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_FORMAT + desc: audio format item in recording menu + user: core + <source> + *: none + recording: "Format" + </source> + <dest> + *: none + recording: "FormÄts" + </dest> + <voice> + *: none + recording: "formaats" + </voice> +</phrase> +<phrase> + id: LANG_AFMT_MPA_L3 + desc: audio format description + user: core + <source> + *: none + recording: "MPEG Layer 3" + </source> + <dest> + *: none + recording: "MPEG Layer 3" + </dest> + <voice> + *: none + recording: "MPEG Layer 3" + </voice> +</phrase> +<phrase> + id: LANG_AFMT_PCM_WAV + desc: audio format description + user: core + <source> + *: none + recording: "PCM Wave" + </source> + <dest> + *: none + recording: "PCM Wave" + </dest> + <voice> + *: none + recording: "PCM Wave" + </voice> +</phrase> +<phrase> + id: LANG_AFMT_WAVPACK + desc: audio format description + user: core + <source> + *: none + recording_swcodec: "WavPack" + </source> + <dest> + *: none + recording_swcodec: "WavPack" + </dest> + <voice> + *: none + recording_swcodec: "WavPack" + </voice> +</phrase> +<phrase> + id: LANG_AFMT_AIFF + desc: audio format description + user: core + <source> + *: none + recording: "AIFF" + </source> + <dest> + *: none + recording: "AIFF" + </dest> + <voice> + *: none + recording: "AIFF" + </voice> +</phrase> +<phrase> + id: LANG_ENCODER_SETTINGS + desc: encoder settings + user: core + <source> + *: none + recording: "Encoder Settings" + </source> + <dest> + *: none + recording: "KodÄ“juma UzstÄdÄ«jumi" + </dest> + <voice> + *: none + recording: "kodeejuma uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_BITRATE + desc: bits-kilobits per unit time + user: core + <source> + *: none + recording_swcodec: "Bitrate" + </source> + <dest> + *: none + recording_swcodec: "Bitreits" + </dest> + <voice> + *: none + recording_swcodec: "bitreits" + </voice> +</phrase> +<phrase> + id: LANG_NO_SETTINGS + desc: when something has settings in a certain context + user: core + <source> + *: none + recording: "(No Settings)" + </source> + <dest> + *: none + recording: "(Nav UzstÄdÄ«jumu)" + </dest> + <voice> + *: none + recording: "nav ko uzstaadiit" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_QUALITY + desc: in the recording settings + user: core + <source> + *: none + recording_hwcodec: "Quality" + </source> + <dest> + *: none + recording_hwcodec: "KvalitÄte" + </dest> + <voice> + *: none + recording_hwcodec: "kvalitaate" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_FREQUENCY + desc: in the recording settings + user: core + <source> + *: none + recording: "Frequency" + </source> + <dest> + *: none + recording: "Frekvence" + </dest> + <voice> + *: none + recording: "frekvence" + </voice> +</phrase> +<phrase> + id: LANG_SOURCE_FREQUENCY + desc: when recording source frequency setting must follow source + user: core + <source> + *: none + recording: "(Same As Source)" + </source> + <dest> + *: none + recording: "(KÄ Avots)" + </dest> + <voice> + *: none + recording: "taads pats kaa avots" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_SOURCE + desc: in the recording settings + user: core + <source> + *: none + recording: "Source" + </source> + <dest> + *: none + recording: "Avots" + </dest> + <voice> + *: none + recording: "avots" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_SRC_MIC + desc: in the recording settings + user: core + <source> + *: none + recording: "Microphone" + iriverh100,iriverh120,iriverh300: "Internal Microphone" + </source> + <dest> + *: none + recording: "Mikrofons" + iriverh100,iriverh120,iriverh300: "IevÅ«vÄ“tais Mikrofons" + </dest> + <voice> + *: none + recording: "mikrofons" + iriverh100,iriverh120,iriverh300: "iebuuveetais mikrofons" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_SRC_DIGITAL + desc: in the recording settings + user: core + <source> + *: none + recording: "Digital" + </source> + <dest> + *: none + recording: "DigitÄls" + </dest> + <voice> + *: none + recording: "digitaals" + </voice> +</phrase> +<phrase> + id: LANG_LINE_IN + desc: in the recording settings + user: core + <source> + *: none + recording,archosplayer: "Line In" + </source> + <dest> + *: none + recording,archosplayer: "LineÄrÄ Ieeja" + </dest> + <voice> + *: none + recording,archosplayer: "lineaaraa ieeja" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_EDITABLE + desc: Editable recordings setting + user: core + <source> + *: none + recording_hwcodec: "Independent Frames" + </source> + <dest> + *: none + recording_hwcodec: "NeatkarÄ«gi Kadri" + </dest> + <voice> + *: none + recording_hwcodec: "neatkariigi kadri" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_TIMESPLIT + desc: Record split menu + user: core + <source> + *: none + recording: "File Split Options" + </source> + <dest> + *: none + recording: "Failu Sadalīšanas Opcijas" + </dest> + <voice> + *: none + recording: "failu sadaliishanas opcijas" + </voice> +</phrase> +<phrase> + id: LANG_SPLIT_MEASURE + desc: in record timesplit options + user: core + <source> + *: none + recording: "Split Measure" + </source> + <dest> + *: none + recording: "Sadalīšanas KritÄ“rijs" + </dest> + <voice> + *: none + recording: "sadaliishanas kriteerijs" + </voice> +</phrase> +<phrase> + id: LANG_SPLIT_TYPE + desc: in record timesplit options + user: core + <source> + *: none + recording: "What to do when Splitting" + </source> + <dest> + *: none + recording: "Ko DarÄ«t PÄ“c Sadalīšanas" + </dest> + <voice> + *: none + recording: "ko dariit peec sadaliishanas" + </voice> +</phrase> +<phrase> + id: LANG_START_NEW_FILE + desc: in record timesplit options + user: core + <source> + *: none + recording: "Start new file" + </source> + <dest> + *: none + recording: "SÄkt Jaunu Failu" + </dest> + <voice> + *: none + recording: "saakt jaunu failu" + </voice> +</phrase> +<phrase> + id: LANG_STOP_RECORDING + desc: in record timesplit options + user: core + <source> + *: none + recording: "Stop recording" + </source> + <dest> + *: none + recording: "Beigt Ierakstu" + </dest> + <voice> + *: none + recording: "beigt ierakstu" + </voice> +</phrase> +<phrase> + id: LANG_SPLIT_TIME + desc: in record timesplit options + user: core + <source> + *: none + recording: "Split Time" + </source> + <dest> + *: none + recording: "Sadalīšanas Laiks" + </dest> + <voice> + *: none + recording: "sadaliishanas laiks" + </voice> +</phrase> +<phrase> + id: LANG_SPLIT_SIZE + desc: in record timesplit options + user: core + <source> + *: none + recording: "Split Filesize" + </source> + <dest> + *: none + recording: "Sadalīšanas IzmÄ“rs" + </dest> + <voice> + *: none + recording: "sadaliishanas izmeers" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_PRERECORD_TIME + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Prerecord Time" + </source> + <dest> + *: none + recording: "Pirmsieraksta Laiks" + </dest> + <voice> + *: none + recording: "pirmsieraksta laiks" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_DIRECTORY + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Directory" + </source> + <dest> + *: none + recording: "Mape" + </dest> + <voice> + *: none + recording: "mape" + </voice> +</phrase> +<phrase> + id: LANG_SET_AS_REC_DIR + desc: used in the onplay menu to set a recording dir + user: core + <source> + *: none + recording: "Set As Recording Directory" + </source> + <dest> + *: none + recording: "Uzlikt Par Ieraksta Mapi" + </dest> + <voice> + *: none + recording: "uzlikt par ieraksta mapi" + </voice> +</phrase> +<phrase> + id: LANG_CLEAR_REC_DIR + desc: + user: core + <source> + *: none + recording: "Clear Recording Directory" + </source> + <dest> + *: none + recording: "PÄrstatÄ«t Ieraksta Mapi" + </dest> + <voice> + *: none + recording: "paarstatiit ieraksta mapi" + </voice> +</phrase> +<phrase> + id: LANG_REC_DIR_NOT_WRITABLE + desc: + user: core + <source> + *: none + recording: "Can't write to recording directory" + </source> + <dest> + *: none + recording: "Nevar saglabÄt ieraksta mapÄ“" + </dest> + <voice> + *: none + recording: "nevar saglabaat ieraksta mapee" + </voice> +</phrase> +<phrase> + id: LANG_CLIP_LIGHT + desc: in record settings menu. + user: core + <source> + *: none + recording: "Clipping Light" + </source> + <dest> + *: none + recording: "PÄrlÄ«meņa Gaisma" + </dest> + <voice> + *: none + recording: "paarliimenja gaisma" + </voice> +</phrase> +<phrase> + id: LANG_MAIN_UNIT + desc: in record settings menu. + user: core + <source> + *: none + remote: "Main Unit Only" + </source> + <dest> + *: none + remote: "Tikai Uz EkrÄna" + </dest> + <voice> + *: none + remote: "tikai uz ekraana" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_UNIT + desc: in record settings menu. + user: core + <source> + *: none + remote: "Remote Unit Only" + </source> + <dest> + *: none + remote: "Tikai Uz Pults" + </dest> + <voice> + *: none + remote: "tikai uz pults" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_MAIN + desc: in record settings menu. + user: core + <source> + *: none + remote: "Main and Remote Unit" + </source> + <dest> + *: none + remote: "Uz EkrÄna Un Pults" + </dest> + <voice> + *: none + remote: "uz ekraana un pults" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_TRIGGER + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Trigger" + </source> + <dest> + *: none + recording: "PalaidÄ“js" + </dest> + <voice> + *: none + recording: "ieraksta palaideejs" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_TRIG_NOREARM + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Once" + </source> + <dest> + *: none + recording: "Vienreiz" + </dest> + <voice> + *: none + recording: "vienreiz" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_TRIGGER_TYPE + desc: in recording trigger menu + user: core + <source> + *: none + recording: "Trigtype" + </source> + <dest> + *: none + recording: "Veids" + </dest> + <voice> + *: none + recording: "veids" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_TRIGGER_NEWFILESTP + desc: trigger types + user: core + <source> + *: none + recording: "New file" + </source> + <dest> + *: none + recording: "Jauns Fails" + </dest> + <voice> + *: none + recording: "jauns fails" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_TRIGGER_STOP + desc: trigger types + user: core + <source> + *: none + recording: "Stop" + </source> + <dest> + *: none + recording: "ApstÄties" + </dest> + <voice> + *: none + recording: "apstaaties" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_START_THRESHOLD + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Start Above" + </source> + <dest> + *: none + recording: "SÄkt Virs" + </dest> + <voice> + *: none + recording: "saakt virs" + </voice> +</phrase> +<phrase> + id: LANG_MIN_DURATION + desc: in recording settings_menu + user: core + <source> + *: none + recording: "for at least" + </source> + <dest> + *: none + recording: "PÄ“c Vismaz" + </dest> + <voice> + *: none + recording: "peec vismaz" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_STOP_THRESHOLD + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Stop Below" + </source> + <dest> + *: none + recording: "ApstÄties Zem" + </dest> + <voice> + *: none + recording: "apstaaties zem" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_STOP_GAP + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Presplit Gap" + </source> + <dest> + *: none + recording: "Pirmssadales Sprauga" + </dest> + <voice> + *: none + recording: "pirmssadales sprauga" + </voice> +</phrase> +<phrase> + id: LANG_RECORD_PRERECORD + desc: in recording and radio screen + user: core + <source> + *: none + recording: "Pre-Recording" + </source> + <dest> + *: none + recording: "Pirmsieraksts" + </dest> + <voice> + *: none + recording: "" + </voice> +</phrase> +<phrase> + id: LANG_AGC_SAFETY + desc: AGC preset + user: core + <source> + *: none + agc: "Safety (clip)" + </source> + <dest> + *: none + agc: "Drošība (Skaļums)" + </dest> + <voice> + *: none + agc: "Droshiiba (skaljums)" + </voice> +</phrase> +<phrase> + id: LANG_AGC_LIVE + desc: AGC preset + user: core + <source> + *: none + agc: "Live (slow)" + </source> + <dest> + *: none + agc: "Koncerts (lÄ“ni)" + </dest> + <voice> + *: none + agc: "koncerts (leeni)" + </voice> +</phrase> +<phrase> + id: LANG_AGC_DJSET + desc: AGC preset + user: core + <source> + *: none + agc: "DJ-Set (slow)" + </source> + <dest> + *: none + agc: "Reps (lÄ“ni)" + </dest> + <voice> + *: none + agc: "reps (leeni)" + </voice> +</phrase> +<phrase> + id: LANG_AGC_MEDIUM + desc: AGC preset + user: core + <source> + *: none + agc: "Medium" + </source> + <dest> + *: none + agc: "VidÄ“ji" + </dest> + <voice> + *: none + agc: "videeji" + </voice> +</phrase> +<phrase> + id: LANG_AGC_VOICE + desc: AGC preset + user: core + <source> + *: none + agc: "Voice (fast)" + </source> + <dest> + *: none + agc: "Balss (Ätri)" + </dest> + <voice> + *: none + agc: "balss (aatri)" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_LCD_OFF + desc: Remote lcd off splash in recording screen + user: core + <source> + *: none + remote: "Remote Display OFF" + </source> + <dest> + *: none + remote: "Pults EkrÄns IzslÄ“gts" + </dest> + <voice> + *: none + remote: "pults ekraans izsleegts" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_LCD_ON + desc: Remote lcd off splash in recording screen + user: core + <source> + *: none + remote: "(Vol- : Re-enable)" + </source> + <dest> + *: none + remote: "(Skaļums- : IeslÄ“gt)" + </dest> + <voice> + *: none + remote: "spiest skaljumu lai iesleegtu" + </voice> +</phrase> +<phrase> + id: LANG_CREATE_PLAYLIST + desc: Menu option for creating a playlist + user: core + <source> + *: "Create Playlist" + </source> + <dest> + *: "Izveidot Sarakstu" + </dest> + <voice> + *: "izveidot sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLISTVIEWER_SETTINGS + desc: title for the playlist viewer settings menus + user: core + <source> + *: "Playlist Viewer Settings" + </source> + <dest> + *: "Sarakstu SkatÄ«tÄja UzstÄdÄ«jumi" + </dest> + <voice> + *: "sarakstu skatiitaaja uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_VIEW_DYNAMIC_PLAYLIST + desc: in playlist menu. + user: core + <source> + *: "View Current Playlist" + </source> + <dest> + *: "AplÅ«kot PatreizÄ“jo Sarakstu" + </dest> + <voice> + *: "apluukot patreizeejo sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_MOVE + desc: The verb/action Move + user: core + <source> + *: "Move" + </source> + <dest> + *: "PÄrvietot" + </dest> + <voice> + *: "paarvietot" + </voice> +</phrase> +<phrase> + id: LANG_SHOW_INDICES + desc: in playlist viewer menu + user: core + <source> + *: "Show Indices" + </source> + <dest> + *: "RÄdÄ«t Indeksus" + </dest> + <voice> + *: "raadiit indeksus" + </voice> +</phrase> +<phrase> + id: LANG_TRACK_DISPLAY + desc: in playlist viewer on+play menu + user: core + <source> + *: "Track Display" + </source> + <dest> + *: "ParÄdÄ«t Dziesmu" + </dest> + <voice> + *: "paraadiit dziesmu" + </voice> +</phrase> +<phrase> + id: LANG_DISPLAY_TRACK_NAME_ONLY + desc: track display options + user: core + <source> + *: "Track Name Only" + </source> + <dest> + *: "Tikai Nosaukumu" + </dest> + <voice> + *: "tikai nosaukumu" + </voice> +</phrase> +<phrase> + id: LANG_REMOVE + desc: in playlist viewer on+play menu + user: core + <source> + *: "Remove" + </source> + <dest> + *: "AizvÄkt" + </dest> + <voice> + *: "aizvaakt" + </voice> +</phrase> +<phrase> + id: LANG_SAVE_DYNAMIC_PLAYLIST + desc: in playlist menu. + user: core + <source> + *: "Save Current Playlist" + </source> + <dest> + *: "SaglabÄt PatreizÄ“jo Sarakstu" + </dest> + <voice> + *: "saglabaat patreizeejo sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_SAVE_COUNT + desc: splash number of tracks saved + user: core + <source> + *: "Saved %d tracks (%s)" + </source> + <dest> + *: "SaglabÄtas %d dziesmas (%s)" + </dest> + <voice> + *: "saglabaatas dziesmas" + </voice> +</phrase> +<phrase> + id: LANG_CATALOG + desc: in main menu and onplay menu + user: core + <source> + *: "Playlist Catalogue" + </source> + <dest> + *: "Sarakstu Katalogs" + </dest> + <voice> + *: "sarakstu katalogs" + </voice> +</phrase> +<phrase> + id: LANG_RECURSE_DIRECTORY + desc: In playlist menu + user: core + <source> + *: "Recursively Insert Directories" + </source> + <dest> + *: "Ievietot Mapes Ar ApakÅ¡mapÄ“m" + </dest> + <voice> + *: "ievietot mapes ar apakshmapeem" + </voice> +</phrase> +<phrase> + id: LANG_RECURSE_DIRECTORY_QUESTION + desc: Asked from onplay screen + user: core + <source> + *: "Recursively?" + </source> + <dest> + *: "Ar ApakÅ¡mapÄ“m?" + </dest> + <voice> + *: "vai ar apakshmapeem" + </voice> +</phrase> +<phrase> + id: LANG_WARN_ERASEDYNPLAYLIST_MENU + desc: in playlist options menu, option to warn when erasing dynamic playlist + user: core + <source> + *: "Warn When Erasing Dynamic Playlist" + </source> + <dest> + *: "BrÄ«dinÄt Dzēšot Dinamisku sarakstu" + </dest> + <voice> + *: "briidinaat dzeeshot dinamisku sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_WARN_ERASEDYNPLAYLIST_PROMPT + desc: prompt shown when about to erase a modified dynamic playlist + user: core + <source> + *: "Erase dynamic playlist?" + </source> + <dest> + *: "IzdzÄ“st Dinamisku Sarakstu?" + </dest> + <voice> + *: "vai izdzeest dinamisku sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_SHUTDOWN + desc: in main menu + user: core + <source> + *: none + soft_shutdown: "Shut down" + </source> + <dest> + *: none + soft_shutdown: "IzslÄ“gt" + </dest> + <voice> + *: none + soft_shutdown: "izsleegt" + </voice> +</phrase> +<phrase> + id: LANG_ROCKBOX_INFO + desc: displayed topmost on the info screen and in the info menu + user: core + <source> + *: "Rockbox Info" + </source> + <dest> + *: "Par Rockbox" + </dest> + <voice> + *: "par rockbox" + </voice> +</phrase> +<phrase> + id: LANG_BUFFER_STAT + desc: the buffer size, %d MB %d fraction of MB + user: core + <source> + *: "Buffer:" + archosplayer: "Buf:" + </source> + <dest> + *: "Buferis:" + archosplayer: "Buf:" + </dest> + <voice> + *: "bufera izmeers" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_TIME + desc: battery level in % and estimated time remaining + user: core + <source> + *: "Battery: %d%% %dh %dm" + archosplayer,archosrecorder,archosfmrecorder,archosrecorderv2,archosondio*,iriverifp7xx: "%d%% %dh %dm" + iriverh10,ipodmini1g,ipodmini2g: "Batt: %d%% %dh %dm" + </source> + <dest> + *: "Baterija: %d%% %ds %dm" + archosplayer,archosrecorder,archosfmrecorder,archosrecorderv2,archosondio*,iriverifp7xx: "%d%% %ds %dm" + iriverh10,ipodmini1g,ipodmini2g: "Bat: %d%% %ds %dm" + </dest> + <voice> + *: "baterijas liimenis" + </voice> +</phrase> +<phrase> + id: LANG_DISK_SIZE_INFO + desc: disk size info + user: core + <source> + *: "Disk:" + </source> + <dest> + *: "Atmiņa:" + </dest> + <voice> + *: "atminjas izmeers" + </voice> +</phrase> +<phrase> + id: LANG_DISK_FREE_INFO + desc: disk size info + user: core + <source> + *: "Free:" + </source> + <dest> + *: "BrÄ«vs:" + </dest> + <voice> + *: "briivaa vieta:" + </voice> +</phrase> +<phrase> + id: LANG_DISK_NAME_INTERNAL + desc: in info menu; name for internal disk with multivolume (keep short!) + user: core + <source> + *: none + multivolume: "Int:" + </source> + <dest> + *: none + multivolume: "IeÄ·Å¡:" + </dest> + <voice> + *: none + multivolume: "ieksheejais" + </voice> +</phrase> +<phrase> + id: LANG_DISK_NAME_MMC + desc: in info menu; name for external disk with multivolume (Ondio; keep short!) + user: core + <source> + *: none + multivolume: "HD1" + sansae200*,sansac200*,sansafuze*,sansaclipplus: "mSD:" + archosondio*: "MMC:" + </source> + <dest> + *: none + multivolume: "HD1" + sansae200*,sansac200*,sansafuze*,sansaclipplus: "MSD:" + archosondio*: "MMC:" + </dest> + <voice> + *: none + multivolume: "haa dee viens" + sansae200*,sansac200*,sansafuze*: "mikro es dee" + archosondio*: "em em cee" + </voice> +</phrase> +<phrase> + id: LANG_VERSION + desc: in the Rockbox Info screen + user: core + <source> + *: "Version" + </source> + <dest> + *: "Versija" + </dest> + <voice> + *: "versija" + </voice> +</phrase> +<phrase> + id: LANG_RUNNING_TIME + desc: in run time screen + user: core + <source> + *: "Running Time" + </source> + <dest> + *: "IeslÄ“gts" + </dest> + <voice> + *: "iesleegts" + </voice> +</phrase> +<phrase> + id: LANG_TOP_TIME + desc: in run time screen + user: core + <source> + *: "Top Time" + </source> + <dest> + *: "IlgÄkais" + </dest> + <voice> + *: "ilgaakais" + </voice> +</phrase> +<phrase> + id: LANG_CLEAR_TIME + desc: in run time screen + user: core + <source> + *: "Clear Time?" + </source> + <dest> + *: "IzdzÄ“st Laiku?" + </dest> + <voice> + *: "vai izdzeest laiku" + </voice> +</phrase> +<phrase> + id: LANG_DEBUG + desc: in the info menu + user: core + <source> + *: "Debug (Keep Out!)" + </source> + <dest> + *: "Kļūdas (Neaiztiec!)" + </dest> + <voice> + *: "kljuudas neaiztiec" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST + desc: Used when you need to say playlist, also voiced + user: core + <source> + *: "Playlist" + </source> + <dest> + *: "Saraksts" + </dest> + <voice> + *: "saraksts" + </voice> +</phrase> +<phrase> + id: LANG_INSERT + desc: in onplay menu. insert a track/playlist into dynamic playlist. + user: core + <source> + *: "Insert" + </source> + <dest> + *: "Ievietot" + </dest> + <voice> + *: "ievietot" + </voice> +</phrase> +<phrase> + id: LANG_INSERT_FIRST + desc: in onplay menu. insert a track/playlist into dynamic playlist. + user: core + <source> + *: "Insert Next" + </source> + <dest> + *: "Ievietot NÄkamo" + </dest> + <voice> + *: "ievietot Naakamo" + </voice> +</phrase> +<phrase> + id: LANG_INSERT_LAST + desc: in onplay menu. append a track/playlist into dynamic playlist. + user: core + <source> + *: "Insert Last" + </source> + <dest> + *: "Ievietot PÄ“dÄ“jo" + </dest> + <voice> + *: "ievietot peedeejo" + </voice> +</phrase> +<phrase> + id: LANG_INSERT_SHUFFLED + desc: in onplay menu. insert a track/playlist randomly into dynamic playlist + user: core + <source> + *: "Insert Shuffled" + </source> + <dest> + *: "Ievietot Sajaukti" + </dest> + <voice> + *: "ievietot sajaukti" + </voice> +</phrase> +<phrase> + id: LANG_QUEUE + desc: The verb/action Queue + user: core + <source> + *: "Queue" + </source> + <dest> + *: "Rinda" + </dest> + <voice> + *: "rinda" + </voice> +</phrase> +<phrase> + id: LANG_QUEUE_FIRST + desc: in onplay menu. queue a track/playlist into dynamic playlist. + user: core + <source> + *: "Queue Next" + </source> + <dest> + *: "RindÄ NÄkamo" + </dest> + <voice> + *: "rindaa naakamo" + </voice> +</phrase> +<phrase> + id: LANG_QUEUE_LAST + desc: in onplay menu. queue a track/playlist at end of playlist. + user: core + <source> + *: "Queue Last" + </source> + <dest> + *: "RindÄ PÄ“dÄ“jo" + </dest> + <voice> + *: "rindÄ peedeejo" + </voice> +</phrase> +<phrase> + id: LANG_QUEUE_SHUFFLED + desc: in onplay menu. queue a track/playlist randomly into dynamic playlist + user: core + <source> + *: "Queue Shuffled" + </source> + <dest> + *: "RindÄ Sajaukti" + </dest> + <voice> + *: "rindaa sajaukti" + </voice> +</phrase> +<phrase> + id: LANG_REPLACE + desc: in onplay menu. Replace the current playlist with a new one. + user: core + <source> + *: "Play Next" + </source> + <dest> + *: "Atskaņot NÄkamo" + </dest> + <voice> + *: "atskanjot naakamo" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_INSERT_COUNT + desc: splash number of tracks inserted + user: core + <source> + *: "Inserted %d tracks (%s)" + </source> + <dest> + *: "Ievietotas %d dziesmas (%s)" + </dest> + <voice> + *: "ievietotas dziesmas" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_QUEUE_COUNT + desc: splash number of tracks queued + user: core + <source> + *: "Queued %d tracks (%s)" + </source> + <dest> + *: "RindÄ %d dziesmas (%s)" + </dest> + <voice> + *: "ievietotas rindaa dziesmas" + </voice> +</phrase> +<phrase> + id: LANG_VIEW + desc: in on+play menu + user: core + <source> + *: "View" + </source> + <dest> + *: "AplÅ«kot" + </dest> + <voice> + *: "apluukot" + </voice> +</phrase> +<phrase> + id: LANG_SEARCH_IN_PLAYLIST + desc: in playlist menu. + user: core + <source> + *: "Search In Playlist" + </source> + <dest> + *: "MeklÄ“t SarakstÄ" + </dest> + <voice> + *: "mekleet sarakstaa" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_SEARCH_MSG + desc: splash number of tracks inserted + user: core + <source> + *: "Searching... %d found (%s)" + </source> + <dest> + *: "MeklÄ“... %d atrastas (%s)" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_SHUFFLE_PLAYLIST + desc: in playlist menu, reshuffles the order in which songs are played + user: core + <source> + *: "Reshuffle" + </source> + <dest> + *: "PÄrkÄrtot" + </dest> + <voice> + *: "paarkaartot" + </voice> +</phrase> +<phrase> + id: LANG_CATALOG_VIEW + desc: in onplay playlist catalogue submenu + user: core + <source> + *: "View Catalogue" + </source> + <dest> + *: "AplÅ«kot Katalogu" + </dest> + <voice> + *: "apluukot katalogu" + </voice> +</phrase> +<phrase> + id: LANG_CATALOG_ADD_TO + desc: in onplay playlist catalogue submenu + user: core + <source> + *: "Add to Playlist" + </source> + <dest> + *: "Pievienot Sarakstam" + </dest> + <voice> + *: "pievienot sarakstam" + </voice> +</phrase> +<phrase> + id: LANG_CATALOG_ADD_TO_NEW + desc: in onplay playlist catalogue submenu + user: core + <source> + *: "Add to New Playlist" + </source> + <dest> + *: "Pievienot Jaunam Sarakstam" + </dest> + <voice> + *: "pievienot jaunam sarakstam" + </voice> +</phrase> +<phrase> + id: LANG_CATALOG_NO_DIRECTORY + desc: error message when playlist catalogue directory doesn't exist + user: core + <source> + *: "%s doesn't exist" + </source> + <dest> + *: "%s nepastÄv" + </dest> + <voice> + *: "saraksta mape nepastaav" + </voice> +</phrase> +<phrase> + id: LANG_CATALOG_NO_PLAYLISTS + desc: error message when no playlists for playlist catalogue + user: core + <source> + *: "No Playlists" + </source> + <dest> + *: "Nav Sarakstu" + </dest> + <voice> + *: "nav sarakstu" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_MENU + desc: Text on main menu to get to bookmark commands + user: core + <source> + *: "Bookmarks" + </source> + <dest> + *: "GrÄmatzÄ«mes" + </dest> + <voice> + *: "graamatziimes" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_MENU_CREATE + desc: Used off of the bookmark menu to create a bookmark + user: core + <source> + *: "Create Bookmark" + </source> + <dest> + *: "Izveidot GrÄmatzÄ«mi" + </dest> + <voice> + *: "izveidot graamatziimi" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_MENU_LIST + desc: Used off of the bookmark menu to list available bookmarks for the currently playing directory or M3U + user: core + <source> + *: "List Bookmarks" + </source> + <dest> + *: "SakÄrtot GrÄmatzÄ«mes" + </dest> + <voice> + *: "sakaartot graamatziimes" + </voice> +</phrase> +<phrase> + id: LANG_ONPLAY_MENU_TITLE + desc: title for the onplay menus + user: core + <source> + *: "Context Menu" + </source> + <dest> + *: "IzvÄ“lne" + </dest> + <voice> + *: "izveelne" + </voice> +</phrase> +<phrase> + id: LANG_MENU_SET_RATING + desc: Set the rating of a file in the wps context menu + user: core + <source> + *: "Set Song Rating" + </source> + <dest> + *: "Uzlikt VÄ“rtÄ“jumu" + </dest> + <voice> + *: "uzlikt veerteejumu" + </voice> +</phrase> +<phrase> + id: LANG_BROWSE_CUESHEET + desc: + user: core + <source> + *: "Browse Cuesheet" + </source> + <dest> + *: "AplÅ«kot cue" + </dest> + <voice> + *: "apluukot cue" + </voice> +</phrase> +<phrase> + id: LANG_MENU_SHOW_ID3_INFO + desc: Menu option to start tag viewer + user: core + <source> + *: "Show Track Info" + </source> + <dest> + *: "Dziesmas Info" + </dest> + <voice> + *: "paraadiit dziesmas info" + </voice> +</phrase> +<phrase> + id: LANG_ID3_TITLE + desc: in tag viewer + user: core + <source> + *: "Title" + </source> + <dest> + *: "Nosaukums" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_ARTIST + desc: in tag viewer + user: core + <source> + *: "Artist" + </source> + <dest> + *: "IzpildÄ«tÄjs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_ALBUM + desc: in tag viewer + user: core + <source> + *: "Album" + </source> + <dest> + *: "AlbÅ«ms" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_TRACKNUM + desc: in tag viewer + user: core + <source> + *: "Tracknum" + </source> + <dest> + *: "Numurs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_GENRE + desc: in tag viewer + user: core + <source> + *: "Genre" + </source> + <dest> + *: "Žanrs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_YEAR + desc: in tag viewer + user: core + <source> + *: "Year" + </source> + <dest> + *: "Gads" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_LENGTH + desc: in tag viewer + user: core + <source> + *: "Length" + </source> + <dest> + *: "Garums" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_PLAYLIST + desc: in tag viewer + user: core + <source> + *: "Playlist" + </source> + <dest> + *: "Saraksts" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_BITRATE + desc: in tag viewer + user: core + <source> + *: "Bitrate" + </source> + <dest> + *: "Bitreits" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_ALBUMARTIST + desc: in tag viewer + user: core + <source> + *: "Album Artist" + </source> + <dest> + *: "AlbÅ«ma IzpildÄ«tÄjs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_DISCNUM + desc: in tag viewer + user: core + <source> + *: "Discnum" + </source> + <dest> + *: "Diska Numurs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_COMMENT + desc: in tag viewer + user: core + <source> + *: "Comment" + </source> + <dest> + *: "KomentÄrs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_VBR + desc: in browse_id3 + user: core + <source> + *: " (VBR)" + </source> + <dest> + *: " (MBR)" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_FREQUENCY + desc: in tag viewer + user: core + <source> + *: "Frequency" + </source> + <dest> + *: "Frekvence" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_TRACK_GAIN + desc: in tag viewer + user: core + <source> + *: "Track Gain" + </source> + <dest> + *: "Dziesmas Skaļums" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_ALBUM_GAIN + desc: in tag viewer + user: core + <source> + *: "Album Gain" + </source> + <dest> + *: "AlbÅ«ma Skaļums" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_PATH + desc: in tag viewer + user: core + <source> + *: "Path" + </source> + <dest> + *: "Ceļš" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_ID3_NO_INFO + desc: in tag viewer + user: core + <source> + *: "<No Info>" + </source> + <dest> + *: "<Nav InformÄcijas>" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_RENAME + desc: The verb/action Rename + user: core + <source> + *: "Rename" + </source> + <dest> + *: "PÄrsaukt" + </dest> + <voice> + *: "paarsaukt" + </voice> +</phrase> +<phrase> + id: LANG_CUT + desc: The verb/action Cut + user: core + <source> + *: "Cut" + </source> + <dest> + *: "Izgriezt" + </dest> + <voice> + *: "izgriezt" + </voice> +</phrase> +<phrase> + id: LANG_COPY + desc: The verb/action Copy + user: core + <source> + *: "Copy" + </source> + <dest> + *: "KopÄ“t" + </dest> + <voice> + *: "kopeet" + </voice> +</phrase> +<phrase> + id: LANG_PASTE + desc: The verb/action Paste + user: core + <source> + *: "Paste" + </source> + <dest> + *: "IelÄ«mÄ“t" + </dest> + <voice> + *: "ieliimeet" + </voice> +</phrase> +<phrase> + id: LANG_REALLY_OVERWRITE + desc: The verb/action Paste + user: core + <source> + *: "File/directory exists. Overwrite?" + </source> + <dest> + *: "Fails/mape jau ir. PÄrrakstÄ«t?" + </dest> + <voice> + *: "fails vai mape jau ir. vai paarrakstiit" + </voice> +</phrase> +<phrase> + id: LANG_DELETE + desc: The verb/action Delete + user: core + <source> + *: "Delete" + </source> + <dest> + *: "IzdzÄ“st" + </dest> + <voice> + *: "izdzeest" + </voice> +</phrase> +<phrase> + id: LANG_DELETE_DIR + desc: in on+play menu + user: core + <source> + *: "Delete Directory" + </source> + <dest> + *: "IzdzÄ“st Mapi" + </dest> + <voice> + *: "izdzeest mapi" + </voice> +</phrase> +<phrase> + id: LANG_REALLY_DELETE + desc: Really Delete? + user: core + <source> + *: "Delete?" + </source> + <dest> + *: "IzdzÄ“st?" + </dest> + <voice> + *: "vai tieshaam izdzeest" + </voice> +</phrase> +<phrase> + id: LANG_COPYING + desc: + user: core + <source> + *: "Copying..." + </source> + <dest> + *: "KopÄ“..." + </dest> + <voice> + *: "kopee" + </voice> +</phrase> +<phrase> + id: LANG_DELETING + desc: + user: core + <source> + *: "Deleting..." + </source> + <dest> + *: "Izdzēš..." + </dest> + <voice> + *: "izdzeesh" + </voice> +</phrase> +<phrase> + id: LANG_MOVING + desc: + user: core + <source> + *: "Moving..." + </source> + <dest> + *: "PÄrvieto..." + </dest> + <voice> + *: "paarvieto" + </voice> +</phrase> +<phrase> + id: LANG_DELETED + desc: A file has beed deleted + user: core + <source> + *: "Deleted" + </source> + <dest> + *: "IzdzÄ“sts" + </dest> + <voice> + *: "izdzeests" + </voice> +</phrase> +<phrase> + id: LANG_SET_AS_BACKDROP + desc: text for onplay menu entry + user: core + <source> + *: none + lcd_non-mono: "Set As Backdrop" + </source> + <dest> + *: none + lcd_non-mono: "Uzlikt KÄ Fonu" + </dest> + <voice> + *: none + lcd_non-mono: "uzlikt kaa fonu" + </voice> +</phrase> +<phrase> + id: LANG_BACKDROP_LOADED + desc: deprecated + user: core + <source> + *: none + lcd_non-mono: "" + </source> + <dest> + *: none + lcd_non-mono: "" + </dest> + <voice> + *: none + lcd_non-mono: "" + </voice> +</phrase> +<phrase> + id: LANG_BACKDROP_FAILED + desc: deprecated + user: core + <source> + *: none + lcd_non-mono: "" + </source> + <dest> + *: none + lcd_non-mono: "" + </dest> + <voice> + *: none + lcd_non-mono: "" + </voice> +</phrase> +<phrase> + id: LANG_ONPLAY_OPEN_WITH + desc: Onplay open with + user: core + <source> + *: "Open With..." + </source> + <dest> + *: "AtvÄ“rt Ar..." + </dest> + <voice> + *: "atveert ar" + </voice> +</phrase> +<phrase> + id: LANG_CREATE_DIR + desc: in main menu + user: core + <source> + *: "Create Directory" + </source> + <dest> + *: "Izveidot Mapi" + </dest> + <voice> + *: "izveidot mapi" + </voice> +</phrase> +<phrase> + id: LANG_PROPERTIES + desc: browser file/dir properties + user: core + <source> + *: "Properties" + </source> + <dest> + *: "Parametri" + </dest> + <voice> + *: "parametri" + </voice> +</phrase> +<phrase> + id: LANG_ADD_TO_FAVES + desc: + user: core + <source> + *: "Add to Shortcuts" + </source> + <dest> + *: "Pievienot SaÄ«snÄ“m" + </dest> + <voice> + *: "pievienot saiisneem" + </voice> +</phrase> +<phrase> + id: LANG_PITCH + desc: "pitch" in the pitch screen + user: core + <source> + *: none + pitchscreen: "Pitch" + </source> + <dest> + *: none + pitchscreen: "Ä€trums" + </dest> + <voice> + *: none + pitchscreen: "aatrums" + </voice> +</phrase> +<phrase> + id: LANG_PITCH_UP + desc: in wps + user: core + <source> + *: none + pitchscreen: "Pitch Up" + </source> + <dest> + *: none + pitchscreen: "PaaugstinÄt" + </dest> + <voice> + *: none + pitchscreen: "" + </voice> +</phrase> +<phrase> + id: LANG_PITCH_DOWN + desc: in wps + user: core + <source> + *: none + pitchscreen: "Pitch Down" + </source> + <dest> + *: none + pitchscreen: "PazeminÄt" + </dest> + <voice> + *: none + pitchscreen: "" + </voice> +</phrase> +<phrase> + id: LANG_PITCH_UP_SEMITONE + desc: in wps + user: core + <source> + *: none + pitchscreen: "Semitone Up" + </source> + <dest> + *: none + pitchscreen: "Pustoni Uz AugÅ¡u" + </dest> + <voice> + *: none + pitchscreen: "" + </voice> +</phrase> +<phrase> + id: LANG_PITCH_DOWN_SEMITONE + desc: in wps + user: core + <source> + *: none + pitchscreen: "Semitone Down" + </source> + <dest> + *: none + pitchscreen: "Pustoni Uz Leju" + </dest> + <voice> + *: none + pitchscreen: "" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_BUFFER_FULL + desc: in playlist.indices() when playlist is full + user: core + <source> + *: "Playlist Buffer Full" + </source> + <dest> + *: "Sarakstu Buferis Pilns" + </dest> + <voice> + *: "sarakstu buferis pilns" + </voice> +</phrase> +<phrase> + id: LANG_END_PLAYLIST + desc: when playlist has finished + user: core + <source> + *: "End of Song List" + archosplayer: "End of List" + </source> + <dest> + *: "Dziesmu Saraksta Beigas" + archosplayer: "Saraksta Beigas" + </dest> + <voice> + *: "saraksta beigas" + </voice> +</phrase> +<phrase> + id: LANG_CREATING + desc: Screen feedback during playlist creation + user: core + <source> + *: "Creating" + </source> + <dest> + *: "Veido" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_NOTHING_TO_RESUME + desc: Error message displayed when resume button pressed but no playlist + user: core + <source> + *: "Nothing to resume" + </source> + <dest> + *: "Nav Ko AtsÄkt" + </dest> + <voice> + *: "nav ko atsaakt" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_CONTROL_UPDATE_ERROR + desc: Playlist error + user: core + <source> + *: "Error updating playlist control file" + </source> + <dest> + *: "Kļūda Atjaunojot Saraksta Kontroles Failu" + </dest> + <voice> + *: "kljuuda izveidojot saraksta kontroles failu" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_ACCESS_ERROR + desc: Playlist error + user: core + <source> + *: "Error accessing playlist file" + </source> + <dest> + *: "Kļūda Atverot Saraksta Failu" + </dest> + <voice> + *: "kljuuda atverot saraksta failu" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_CONTROL_ACCESS_ERROR + desc: Playlist error + user: core + <source> + *: "Error accessing playlist control file" + </source> + <dest> + *: "Kļūda Atverot Saraksta Kontroles Failu" + </dest> + <voice> + *: "kljuuda atverot saraksta kontroles failu" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR + desc: Playlist error + user: core + <source> + *: "Error accessing directory" + </source> + <dest> + *: "Kļūda Atverot Mapi" + </dest> + <voice> + *: "kljuuda atverot mapi" + </voice> +</phrase> +<phrase> + id: LANG_PLAYLIST_CONTROL_INVALID + desc: Playlist resume error + user: core + <source> + *: "Playlist control file is invalid" + </source> + <dest> + *: "Saraksta Kontroles Fails NederÄ«gs" + </dest> + <voice> + *: "saraksta kontroles fails ir nederiigs" + </voice> +</phrase> +<phrase> + id: LANG_PAUSE + desc: in wps and recording trigger menu + user: core + <source> + *: "Pause" + </source> + <dest> + *: "Pauze" + </dest> + <voice> + *: "pauze" + </voice> +</phrase> +<phrase> + id: LANG_MODE + desc: in wps F2 pressed and radio screen + user: core + <source> + *: "Mode:" + </source> + <dest> + *: "Režīms:" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_TIME + desc: Used on the bookmark select window to label elapsed time + user: core + <source> + *: "Time" + </source> + <dest> + *: "Laiks" + </dest> + <voice> + *: "laiks" + </voice> +</phrase> +/* TODO: cleanup LANG_USB_CHARGING unless HAVE_USB_CHARGING_ENABLE defined, + * the selector should probably be usb_charging_enable_enable as well. */ +<phrase> + id: LANG_USB_CHARGING + desc: in Battery menu + user: core + <source> + *: none + usb_charging_enable: "Charge During USB Connection" + </source> + <dest> + *: none + usb_charging_enable: "LÄdÄ“t ar USB" + </dest> + <voice> + *: none + usb_charging_enable: "laadeet ar uuesbee" + </voice> +</phrase> +<phrase> + id: LANG_KEYLOCK_ON + desc: displayed when key lock is on + user: core + <source> + *: "Buttons Locked" + </source> + <dest> + *: "Pogas NobloÄ·Ä“tas" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_KEYLOCK_OFF + desc: displayed when key lock is turned off + user: core + <source> + *: "Buttons Unlocked" + </source> + <dest> + *: "Pogas AtbloÄ·Ä“tas" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_TIME + desc: Display of recorded time + user: core + <source> + *: none + recording: "Time:" + </source> + <dest> + *: none + recording: "Laiks:" + </dest> + <voice> + *: none + recording: "" + </voice> +</phrase> +<phrase> + id: LANG_DISK_FULL + desc: in recording screen + user: core + <source> + *: none + recording: "The disk is full. Press OFF to continue." + iriverh100,iriverh120,iriverh300: "The disk is full. Press STOP to continue." + iaudiom5,iaudiox5: "The disk is full. Press POWER to continue." + sansae200*,sansac200*,vibe500: "The disk is full. Press PREV to continue." + </source> + <dest> + *: none + recording: "Atmiņa pilna. Spied OFF lai turpinÄtu." + iriverh100,iriverh120,iriverh300: "Atmiņa pilna. Spied STOP lai turpinÄtu." + iaudiom5,iaudiox5: "Atmiņa pilna. Spied POWER lai turpinÄtu." + sansae200*,sansac200*,vibe500: "Atmiņa pilna. Spied PREV lai turpinÄtu." + </dest> + <voice> + *: none + recording,iriverh100,iriverh120,iriverh300,iaudiom5,iaudiox5,sansae200*,sansac200*: "" + </voice> +</phrase> +<phrase> + id: LANG_DB_INF + desc: -inf db for values below measurement + user: core + <source> + *: none + recording: "-inf" + </source> + <dest> + *: none + recording: "-neg" + </dest> + <voice> + *: none + recording: "miinus bezgaliiba" + </voice> +</phrase> +<phrase> + id: LANG_CONFIRM_SHUTDOWN + desc: in shutdown screen + user: core + <source> + *: none + soft_shutdown: "Press OFF to shut down" + </source> + <dest> + *: none + soft_shutdown: "Spied OFF lai izslÄ“gtu" + </dest> + <voice> + *: none + soft_shutdown: "" + </voice> +</phrase> +<phrase> + id: LANG_REMOVE_MMC + desc: before acknowledging usb in case an MMC is inserted (Ondio) + user: core + <source> + *: none + archosondio*: "Please remove inserted MMC" + </source> + <dest> + *: none + archosondio*: "LÅ«dzu izņemiet ievietoto MMC" + </dest> + <voice> + *: none + archosondio*: "luudzu iznjemiet atminjas karti" + </voice> +</phrase> +<phrase> + id: LANG_BOOT_CHANGED + desc: File browser discovered the boot file was changed + user: core + <source> + *: "Boot changed" + </source> + <dest> + *: "Fails IzmainÄ«ts" + </dest> + <voice> + *: "fails izmainiits" + </voice> +</phrase> +<phrase> + id: LANG_REBOOT_NOW + desc: Do you want to reboot? + user: core + <source> + *: "Reboot now?" + </source> + <dest> + *: "PÄrstartÄ“t tagad?" + </dest> + <voice> + *: "vai paarstarteet tagad" + </voice> +</phrase> +<phrase> + id: LANG_OFF_ABORT + desc: Used on archosrecorder models + user: core + <source> + *: "OFF to abort" + archosplayer,iriverh100,iriverh120,iriverh300: "STOP to abort" + ipod*: "PLAY/PAUSE to abort" + iaudiox5,iaudiom5: "Long PLAY to abort" + iriverh10,iriverh10_5gb,sansae200*,sansac200*,vibe500: "PREV to abort" + gigabeats: "BACK to abort" + gigabeatfx: "POWER to abort" + </source> + <dest> + *: "OFF lai pÄrtrauktu" + archosplayer,iriverh100,iriverh120,iriverh300: "STOP lai pÄrtrauktu" + ipod*: "PLAY/PAUSE lai pÄrtrauktu" + iaudiox5,iaudiom5: "Long PLAY lai pÄrtrauktu" + iriverh10,iriverh10_5gb,sansae200*,sansac200*,vibe500: "PREV lai pÄrtrauktu" + gigabeats: "BACK lai pÄrtrauktu" + gigabeatfx: "POWER lai pÄrtrauktu" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_NO_FILES + desc: in settings_menu + user: core + <source> + *: "No files" + </source> + <dest> + *: "Nav Failu" + </dest> + <voice> + *: "nav failu" + </voice> +</phrase> +<phrase> + id: LANG_KEYBOARD_LOADED + desc: shown when a keyboard has been loaded from the dir browser + user: core + <source> + *: "New Keyboard" + </source> + <dest> + *: "Jauna KlaviatÅ«ra" + </dest> + <voice> + *: "jauna klaviatuura" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_CANT_OPEN + desc: Plugin open error message + user: core + <source> + *: "Can't open %s" + </source> + <dest> + *: "Nevar atvÄ“rt %s" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_READ_FAILED + desc: There was an error reading a file + user: core + <source> + *: "Failed reading %s" + </source> + <dest> + *: "NeizdevÄs nolasÄ«t %s" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_WRONG_MODEL + desc: The plugin is not compatible with the archos model trying to run it + user: core + <source> + *: "Incompatible model" + </source> + <dest> + *: "NesaderÄ«gs modelis" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_WRONG_VERSION + desc: The plugin is not compatible with the rockbox version trying to run it + user: core + <source> + *: "Incompatible version" + </source> + <dest> + *: "NesaderÄ«ga versija" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_ERROR + desc: The plugin return an error code + user: core + <source> + *: "Plugin returned error" + </source> + <dest> + *: "Spraudnis izmeta kļūdu" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_FILETYPES_FULL + desc: Filetype array full + user: core + <source> + *: "Filetype array full" + </source> + <dest> + *: "Failu Veidu Saraksts Pilns" + </dest> + <voice> + *: "failu veidu saraksts pilns" + </voice> +</phrase> +<phrase> + id: LANG_SHOWDIR_BUFFER_FULL + desc: in showdir(), displayed on screen when you reach buffer limit + user: core + <source> + *: "Dir Buffer is Full!" + </source> + <dest> + *: "Mapes Buferis Ir Pilns!" + </dest> + <voice> + *: "mapes buferis ir pilns" + </voice> +</phrase> +<phrase> + id: LANG_INVALID_FILENAME + desc: "invalid filename entered" error message + user: core + <source> + *: "Invalid Filename!" + </source> + <dest> + *: "NederÄ«gs Faila Nosaukums!" + </dest> + <voice> + *: "nederiigs faila nosaukums" + </voice> +</phrase> +<phrase> + id: LANG_PLEASE_REBOOT + desc: when activating an option that requires a reboot + user: core + <source> + *: "Please reboot to enable" + </source> + <dest> + *: "PÄrstartÄ“jiet Lai IeslÄ“gtu" + </dest> + <voice> + *: "paarstarteejiet lai iesleegtu" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_CHARGE + desc: tells that the battery is charging, instead of battery level + user: core + <source> + *: none + charging: "Battery: Charging" + </source> + <dest> + *: none + charging: "Baterija: LÄdÄ“jas" + </dest> + <voice> + *: none + charging: "baterija laadeejas" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_TOPOFF_CHARGE + desc: in info display, shows that top off charge is running Only for V1 archosrecorder + user: core + <source> + *: none + archosrecorder: "Battery: Top-Off Chg" + </source> + <dest> + *: none + archosrecorder: "Baterija: Beidz LÄdÄ“t" + </dest> + <voice> + *: none + archosrecorder: "pabeigshanas laadinjsh" + </voice> +</phrase> +<phrase> + id: LANG_BATTERY_TRICKLE_CHARGE + desc: in info display, shows that trickle charge is running + user: core + <source> + *: none + charging: "Battery: Trickle Chg" + </source> + <dest> + *: none + charging: "Baterija: UzlÄdÄ“ts" + </dest> + <voice> + *: none + charging: "laadeeshana pabeigta" + </voice> +</phrase> +<phrase> + id: LANG_WARNING_BATTERY_LOW + desc: general warning + user: core + <source> + *: "WARNING! Low Battery!" + </source> + <dest> + *: "Baterija GandrÄ«z TukÅ¡a!" + </dest> + <voice> + *: "baterija gandriiz tuksha" + </voice> +</phrase> +<phrase> + id: LANG_WARNING_BATTERY_EMPTY + desc: general warning + user: core + <source> + *: "Battery empty! RECHARGE!" + </source> + <dest> + *: "Baterija TukÅ¡a! JÄ€LÄ€DÄ’!" + </dest> + <voice> + *: "baterija tuksha jaalaadee" + </voice> +</phrase> +<phrase> + id: LANG_BYTE + desc: a unit postfix + user: core + <source> + *: "B" + </source> + <dest> + *: "B" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_KILOBYTE + desc: a unit postfix, also voiced + user: core + <source> + *: "KB" + </source> + <dest> + *: "KB" + </dest> + <voice> + *: "kilobaits" + </voice> +</phrase> +<phrase> + id: LANG_MEGABYTE + desc: a unit postfix, also voiced + user: core + <source> + *: "MB" + </source> + <dest> + *: "MB" + </dest> + <voice> + *: "megabaits" + </voice> +</phrase> +<phrase> + id: LANG_GIGABYTE + desc: a unit postfix, also voiced + user: core + <source> + *: "GB" + </source> + <dest> + *: "GB" + </dest> + <voice> + *: "gigabaits" + </voice> +</phrase> +<phrase> + id: LANG_POINT + desc: decimal separator for composing numbers + user: core + <source> + *: "." + </source> + <dest> + *: "." + </dest> + <voice> + *: "punkts" + </voice> +</phrase> +<phrase> + id: VOICE_ZERO + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "nulle" + </voice> +</phrase> +<phrase> + id: VOICE_ONE + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "viens" + </voice> +</phrase> +<phrase> + id: VOICE_TWO + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "divi" + </voice> +</phrase> +<phrase> + id: VOICE_THREE + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "triis" + </voice> +</phrase> +<phrase> + id: VOICE_FOUR + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "chetri" + </voice> +</phrase> +<phrase> + id: VOICE_FIVE + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "pieci" + </voice> +</phrase> +<phrase> + id: VOICE_SIX + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "seshi" + </voice> +</phrase> +<phrase> + id: VOICE_SEVEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "septinji" + </voice> +</phrase> +<phrase> + id: VOICE_EIGHT + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "astonji" + </voice> +</phrase> +<phrase> + id: VOICE_NINE + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "devinji" + </voice> +</phrase> +<phrase> + id: VOICE_TEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "desmit" + </voice> +</phrase> +<phrase> + id: VOICE_ELEVEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "vienpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_TWELVE + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "divpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_THIRTEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "triispadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_FOURTEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "chetrpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_FIFTEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "piecpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_SIXTEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "seshpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_SEVENTEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "septinjpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_EIGHTEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "astonjpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_NINETEEN + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "devinjpadsmit" + </voice> +</phrase> +<phrase> + id: VOICE_TWENTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "divdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_THIRTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "triisdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_FORTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "chetrdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_FIFTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "piecdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_SIXTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "seshdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_SEVENTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "septinjdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_EIGHTY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "astonjdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_NINETY + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "devinjdesmit" + </voice> +</phrase> +<phrase> + id: VOICE_HUNDRED + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "simts" + </voice> +</phrase> +<phrase> + id: VOICE_THOUSAND + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "tuukstotis" + </voice> +</phrase> +<phrase> + id: VOICE_MILLION + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "miljons" + </voice> +</phrase> +<phrase> + id: VOICE_BILLION + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "miljards" + </voice> +</phrase> +<phrase> + id: VOICE_MINUS + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "miinus" + </voice> +</phrase> +<phrase> + id: VOICE_PLUS + desc: spoken only, for composing numbers + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "plus" + </voice> +</phrase> +<phrase> + id: VOICE_MILLISECONDS + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "milisekundes" + </voice> +</phrase> +<phrase> + id: VOICE_SECOND + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "sekunde" + </voice> +</phrase> +<phrase> + id: VOICE_SECONDS + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "sekundes" + </voice> +</phrase> +<phrase> + id: VOICE_MINUTE + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "minuute" + </voice> +</phrase> +<phrase> + id: VOICE_MINUTES + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "minuutes" + </voice> +</phrase> +<phrase> + id: VOICE_HOUR + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "stunda" + </voice> +</phrase> +<phrase> + id: VOICE_HOURS + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "stundas" + </voice> +</phrase> +<phrase> + id: VOICE_KHZ + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "kilohercs" + </voice> +</phrase> +<phrase> + id: VOICE_DB + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "decibels" + </voice> +</phrase> +<phrase> + id: VOICE_PERCENT + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "procents" + </voice> +</phrase> +<phrase> + id: VOICE_MILLIAMPHOURS + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "mili-ampeer stundas" + </voice> +</phrase> +<phrase> + id: VOICE_PIXEL + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "pikselis" + </voice> +</phrase> +<phrase> + id: VOICE_PER_SEC + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "sekundee" + </voice> +</phrase> +<phrase> + id: VOICE_HERTZ + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "hercs" + </voice> +</phrase> +<phrase> + id: VOICE_KBIT_PER_SEC + desc: spoken only, a unit postfix + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "kilobiti sekundee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_A + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "aa" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_B + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "bee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_C + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "cee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_D + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "dee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_E + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "ee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_F + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "ef" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_G + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "gaa" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_H + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "haa" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_I + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "ii" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_J + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "jee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_K + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "kaa" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_L + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "el" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_M + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "em" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_N + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "en" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_O + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "o" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_P + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "pee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_Q + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "kjuu" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_R + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "er" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_S + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "es" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_T + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "tee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_U + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "uu" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_V + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "vee" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_W + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "dabljuu" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_X + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "iks" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_Y + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "igrek" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_Z + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "zed" + </voice> +</phrase> +<phrase> + id: VOICE_DOT + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "punkts" + </voice> +</phrase> +<phrase> + id: VOICE_PAUSE + desc: spoken only, for spelling, a split second of silence (difficult to author) + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: " " + </voice> +</phrase> +<phrase> + id: VOICE_FILE + desc: spoken only, prefix for file number + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "fails" + </voice> +</phrase> +<phrase> + id: VOICE_DIR + desc: spoken only, prefix for directory number + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "mape" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_MPA + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "audio" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_CFG + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "konfiguraacija" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_WPS + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "atskanjoshanas ekraans" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_ROCK + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "spraudnis" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_FONT + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "fonts" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_BMARK + desc: spoken only, for file extension and the word in general + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "graamatziime" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_AJZ + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "programmatuura" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_RWPS + desc: spoken only, for file extension + user: core + <source> + *: none + remote: "" + </source> + <dest> + *: none + remote: "" + </dest> + <voice> + *: none + remote: "pults atskanjoshanas ekraans" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_KBD + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "klaviatuura" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_CUESHEET + desc: + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "cue fails" + </voice> +</phrase> +<phrase> + id: VOICE_BOOKMARK_SELECT_INDEX_TEXT + desc: voice only, used in the bookmark list to label index number + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "indekss" + </voice> +</phrase> +<phrase> + id: VOICE_CURRENT_TIME + desc: spoken only, for wall clock announce + user: core + <source> + *: none + rtc: "" + </source> + <dest> + *: none + rtc: "" + </dest> + <voice> + *: none + rtc: "Patreizeejais laiks:" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_EQUALIZER_EDIT_MODE + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Edit mode: %s %s" + </source> + <dest> + *: none + swcodec: "Izmainit: %s %s" + </dest> + <voice> + *: none + swcodec: "" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_EQUALIZER_BAND_CUTOFF + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Cutoff" + </source> + <dest> + *: none + swcodec: "Robeza" + </dest> + <voice> + *: none + swcodec: "robezhfrekvence" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_GAIN + desc: in the equalizer settings menu + user: core + <source> + *: none + swcodec: "Gain" + </source> + <dest> + *: none + swcodec: "Pastiprinajums" + </dest> + <voice> + *: none + swcodec: "pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_MODE + desc: in wps F2 pressed + user: core + <source> + *: none + lcd_bitmap: "Mode:" + </source> + <dest> + *: none + lcd_bitmap: "Režīms:" + </dest> + <voice> + *: none + lcd_bitmap: "" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_DIRBROWSE_F1 + desc: in dir browser, F1 button bar text + user: core + <source> + *: none + recorder_pad: "Menu" + </source> + <dest> + *: none + recorder_pad: "IzvÄ“lne" + </dest> + <voice> + *: none + recorder_pad: "" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_DIRBROWSE_F2 + desc: in dir browser, F2 button bar text + user: core + <source> + *: none + recorder_pad: "Option" + </source> + <dest> + *: none + recorder_pad: "Opcija" + </dest> + <voice> + *: none + recorder_pad: "" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_DIRBROWSE_F3 + desc: in dir browser, F3 button bar text + user: core + <source> + *: none + recorder_pad: "LCD" + </source> + <dest> + *: none + recorder_pad: "EkrÄns" + </dest> + <voice> + *: none + recorder_pad: "" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_CHANNEL_STEREO + desc: in sound_settings + user: core + <source> + *: none + recording: "Stereo" + </source> + <dest> + *: none + recording: "Stereo" + </dest> + <voice> + *: none + recording: "stereo" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_CHANNEL_MONO + desc: in sound_settings + user: core + <source> + *: none + recording: "Mono" + </source> + <dest> + *: none + recording: "Mono" + </dest> + <voice> + *: none + recording: "mono" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_RECORDING_QUALITY + desc: in the recording settings + user: core + <source> + *: none + recording_hwcodec: "Quality" + </source> + <dest> + *: none + recording_hwcodec: "KvalitÄte" + </dest> + <voice> + *: none + recording_hwcodec: "kvalitaate" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_RECORDING_FREQUENCY + desc: in the recording settings + user: core + <source> + *: none + recording: "Frequency" + </source> + <dest> + *: none + recording: "Frekvence" + </dest> + <voice> + *: none + recording: "frekvence" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_RECORDING_SOURCE + desc: in the recording settings + user: core + <source> + *: none + recording: "Source" + </source> + <dest> + *: none + recording: "Avots" + </dest> + <voice> + *: none + recording: "avots" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_RECORDING_SRC_MIC + desc: in the recording settings + user: core + <source> + *: none + recording: "Int. Mic" + </source> + <dest> + *: none + recording: "Ieb. Mikr" + </dest> + <voice> + *: none + recording: "iebuuveetais mikrofons" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_LINE_IN + desc: in the recording settings + user: core + <source> + *: none + recording: "Line In" + </source> + <dest> + *: none + recording: "LineÄrÄ Ieeja" + </dest> + <voice> + *: none + recording: "lineaaraa ieeja" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_RECORDING_SRC_DIGITAL + desc: in the recording settings + user: core + <source> + *: none + recording: "Digital" + </source> + <dest> + *: none + recording: "DigitÄlÄ" + </dest> + <voice> + *: none + recording: "digitaalaa ieeja" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_CHANNELS + desc: in the recording settings + user: core + <source> + *: none + recording: "Channels" + </source> + <dest> + *: none + recording: "KanÄli" + </dest> + <voice> + *: none + recording: "kanaali" + </voice> +</phrase> +<phrase> + id: LANG_SYSFONT_RECORD_TRIGGER + desc: in recording settings_menu + user: core + <source> + *: none + recording: "Trigger" + </source> + <dest> + *: none + recording: "PalaidÄ“js" + </dest> + <voice> + *: none + recording: "palaideejs" + </voice> +</phrase> +<phrase> + id: VOICE_OF + desc: spoken only, as in 3/8 => 3 of 8 + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "no" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_GAMES + desc: in the main menu + user: core + <source> + *: "Games" + </source> + <dest> + *: "SpÄ“les" + </dest> + <voice> + *: "speeles" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_APPS + desc: in the main menu + user: core + <source> + *: "Applications" + </source> + <dest> + *: "Programmas" + </dest> + <voice> + *: "programmas" + </voice> +</phrase> +<phrase> + id: LANG_PLUGIN_DEMOS + desc: in the main menu + user: core + <source> + *: "Demos" + </source> + <dest> + *: "DemonstrÄcijas" + </dest> + <voice> + *: "demonstraacijas" + </voice> +</phrase> +<phrase> + id: LANG_ID3_GROUPING + desc: in tag viewer + user: core + <source> + *: "Work" + </source> + <dest> + *: "Darbs" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_SHOW_FILENAME_EXT + desc: in settings_menu + user: core + <source> + *: "Show Filename Extensions" + </source> + <dest> + *: "RÄdÄ«t PaplaÅ¡inÄjumus" + </dest> + <voice> + *: "raadiit paplashinaajumus" + </voice> +</phrase> +<phrase> + id: LANG_UNKNOWN_TYPES + desc: in settings_menu + user: core + <source> + *: "Only Unknown Types" + </source> + <dest> + *: "Tikai NezinÄmiem" + </dest> + <voice> + *: "tikai nezinaamiem" + </voice> +</phrase> +<phrase> + id: LANG_EXT_ONLY_VIEW_ALL + desc: in settings_menu + user: core + <source> + *: "Only When Viewing All Types" + </source> + <dest> + *: "Tikai Skatoties Visus Veidus" + </dest> + <voice> + *: "tikai skatoties visus veidus" + </voice> +</phrase> +<phrase> + id: VOICE_PM_UNITS_PER_TICK + desc: spoken only, peak meter release unit + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "vieniibas uz klikshkji" + </voice> +</phrase> +<phrase> + id: VOICE_OCLOCK + desc: spoken only, for wall clock announce + user: core + <source> + *: none + rtc: "" + </source> + <dest> + *: none + rtc: "" + </dest> + <voice> + *: none + rtc: "pulkstenis" + </voice> +</phrase> +<phrase> + id: VOICE_PM + desc: spoken only, for wall clock announce + user: core + <source> + *: none + rtc: "" + </source> + <dest> + *: none + rtc: "" + </dest> + <voice> + *: none + rtc: "pee em" + </voice> +</phrase> +<phrase> + id: VOICE_AM + desc: spoken only, for wall clock announce + user: core + <source> + *: none + rtc: "" + </source> + <dest> + *: none + rtc: "" + </dest> + <voice> + *: none + rtc: "aa em" + </voice> +</phrase> +<phrase> + id: VOICE_OH + desc: spoken only, for wall clock announce + user: core + <source> + *: none + rtc: "" + </source> + <dest> + *: none + rtc: "" + </dest> + <voice> + *: none + rtc: " " + </voice> +</phrase> +<phrase> + id: LANG_PM_CLIPCOUNTER + desc: in settings, for recording peak meter + user: core + <source> + *: none + recording: "Clip Counter" + </source> + <dest> + *: none + recording: "PÄrlÄ«meņa SkaitÄ«tÄjs" + </dest> + <voice> + *: none + recording: "paarliimenja skaitiitaajs" + </voice> +</phrase> +<phrase> + id: LANG_SELECTOR_START_COLOR + desc: line selector color option + user: core + <source> + *: none + lcd_color: "Primary Colour" + </source> + <dest> + *: none + lcd_color: "PrimÄrÄ KrÄsa" + </dest> + <voice> + *: none + lcd_color: "primaaraa kraasa" + </voice> +</phrase> +<phrase> + id: LANG_SELECTOR_END_COLOR + desc: line selector color option + user: core + <source> + *: none + lcd_color: "Secondary Colour" + </source> + <dest> + *: none + lcd_color: "SekundÄrÄ KrÄsa" + </dest> + <voice> + *: none + lcd_color: "sekundaaraa kraasa" + </voice> +</phrase> +<phrase> + id: LANG_SELECTOR_TEXT_COLOR + desc: line selector text color option + user: core + <source> + *: none + lcd_color: "Text Colour" + </source> + <dest> + *: none + lcd_color: "Teksta KrÄsa" + </dest> + <voice> + *: none + lcd_color: "teksta kraasa" + </voice> +</phrase> +<phrase> + id: LANG_INVERT_CURSOR_COLOR + desc: in settings_menu + user: core + <source> + *: none + lcd_color: "Bar (Solid Colour)" + </source> + <dest> + *: none + lcd_color: "Josla (VienkrÄsaina)" + </dest> + <voice> + *: none + lcd_color: "vienkraasaina josla" + </voice> +</phrase> +<phrase> + id: LANG_INVERT_CURSOR_GRADIENT + desc: in settings_menu + user: core + <source> + *: none + lcd_color: "Bar (Gradient Colour)" + </source> + <dest> + *: none + lcd_color: "Josla (MainÄ«gas Krasas)" + </dest> + <voice> + *: none + lcd_color: "mainiigu kraasu josla" + </voice> +</phrase> +<phrase> + id: LANG_CODEPAGE_CENTRAL_EUROPEAN + desc: in codepage setting menu + user: core + <source> + *: "Central European (CP1250)" + </source> + <dest> + *: "CentrÄlÄs Eiropas (CP1250)" + </dest> + <voice> + *: "centraalaas eiropas" + </voice> +</phrase> +<phrase> + id: LANG_THEME_MENU + desc: in the settings menu + user: core + <source> + *: "Theme Settings" + </source> + <dest> + *: "TÄ“mas UzstÄdÄ«jumi" + </dest> + <voice> + *: "teemas uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_COLORS_MENU + desc: colours menu under theme settings + user: core + <source> + *: none + lcd_color: "Colours" + </source> + <dest> + *: none + lcd_color: "KrÄsas" + </dest> + <voice> + *: none + lcd_color: "kraasas" + </voice> +</phrase> +<phrase> + id: LANG_SELECTOR_COLOR_MENU + desc: line selector color menu title + user: core + <source> + *: none + lcd_color: "Line Selector Colours" + </source> + <dest> + *: none + lcd_color: "IzvÄ“les Joslas KrÄsas" + </dest> + <voice> + *: none + lcd_color: "izveeles joslas kraasas" + </voice> +</phrase> +<phrase> + id: VOICE_EDIT + desc: keyboard + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "redigjeet" + </voice> +</phrase> +<phrase> + id: VOICE_BLANK + desc: keyboard + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "tukshs" + </voice> +</phrase> +<phrase> + id: VOICE_EMPTY_LIST + desc: spoken only, when a list dialog contains no elements + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "tukshs saraksts" + </voice> +</phrase> +<phrase> + id: LANG_NOT_PRESENT + desc: when external memory is not present + user: core + <source> + *: none + multivolume: "Not present" + </source> + <dest> + *: none + multivolume: "Nav" + </dest> + <voice> + *: none + multivolume: "nav" + </voice> +</phrase> +<phrase> + id: LANG_TALK_BATTERY_LEVEL + desc: Setting for spontaneous battery level announcement + user: core + <source> + *: "Announce Battery Level" + </source> + <dest> + *: "IzrunÄt Baterijas LÄ«meni" + </dest> + <voice> + *: "izrunaat baterijas liimeni" + </voice> +</phrase> +<phrase> + id: LANG_VOICE_FILETYPE + desc: voice settings menu + user: core + <source> + *: "Say File Type" + </source> + <dest> + *: "IzrunÄt Faila Veidu" + </dest> + <voice> + *: "izrunaat faila veidu" + </voice> +</phrase> +<phrase> + id: LANG_BASS_CUTOFF + desc: Bass setting cut-off frequency + user: core + <source> + *: none + ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "Bass Cutoff" + </source> + <dest> + *: none + ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "Basu Robežfrekvence" + </dest> + <voice> + *: none + ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "basu robezhfrekvence" + </voice> +</phrase> +<phrase> + id: LANG_TREBLE_CUTOFF + desc: Treble setting cut-off frequency + user: core + <source> + *: none + ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "Treble Cutoff" + </source> + <dest> + *: none + ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "AF Robežfrekvence" + </dest> + <voice> + *: none + ipodvideo,ipod6g,mpiohd200,mpiohd300,gigabeatfx,mrobe100: "augsto frekvenchu robezhfrekvence" + </voice> +</phrase> +<phrase> + id: LANG_TAGNAVI_RANDOM + desc: "<Random>" entry in tag browser + user: core + <source> + *: "<Random>" + </source> + <dest> + *: "<DažÄdi>" + </dest> + <voice> + *: "dazhaadi" + </voice> +</phrase> +<phrase> + id: LANG_SAVE_SOUND + desc: save a sound config file + user: core + <source> + *: "Save Sound Settings" + </source> + <dest> + *: "SaglabÄt Skaņas UzstÄdÄ«jumus" + </dest> + <voice> + *: "saglabaat skanjas uzstaadiijumus" + </voice> +</phrase> +<phrase> + id: LANG_KEYCLICK + desc: in keyclick settings menu + user: core + <source> + *: none + swcodec: "Keyclick" + </source> + <dest> + *: none + swcodec: "Klikšķis" + </dest> + <voice> + *: none + swcodec: "klikshkjis" + </voice> +</phrase> +<phrase> + id: LANG_KEYCLICK_REPEATS + desc: in keyclick settings menu + user: core + <source> + *: none + swcodec: "Keyclick Repeats" + </source> + <dest> + *: none + swcodec: "Klikšķu AtkÄrtoÅ¡ana" + </dest> + <voice> + *: none + swcodec: "klikshkju atkaartoshana" + </voice> +</phrase> +<phrase> + id: LANG_ACCESSORY_SUPPLY + desc: in system settings menu + user: core + <source> + *: none + accessory_supply: "Accessory Power Supply" + </source> + <dest> + *: none + accessory_supply: "AksesuÄru BaroÅ¡ana" + </dest> + <voice> + *: none + accessory_supply: "aksesuaaru baroshana" + </voice> +</phrase> +<phrase> + id: LANG_UNKNOWN + desc: generic string for unknown states, such as an unset clock + user: core + <source> + *: "Unknown" + </source> + <dest> + *: "NezinÄms" + </dest> + <voice> + *: "nezinaams" + </voice> +</phrase> +<phrase> + id: VOICE_QUICKSCREEN + desc: spoken only, Announces entering the "quick screen" + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "aatrais ekraans" + </voice> +</phrase> +<phrase> + id: VOICE_OK + desc: spoken only, On exiting a context, specifically the quick screen + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "labi" + </voice> +</phrase> +<phrase> + id: LANG_STOP_RECORDING_AND_SHUTDOWN + desc: in record timesplit options + user: core + <source> + *: none + recording: "Stop Recording And Shutdown" + </source> + <dest> + *: none + recording: "Beigt Ierakstu Un IzslÄ“gties" + </dest> + <voice> + *: none + recording: "beigt ierakstu un izsleegties" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHPAD_SENSITIVITY + desc: touchpad sensitivity setting + user: core + <source> + *: none + gigabeatfx: "Touchpad Sensitivity" + </source> + <dest> + *: none + gigabeatfx: "SkÄrienvirsmas JÅ«tÄ«ba" + </dest> + <voice> + *: none + gigabeatfx: "skaarienvirsmas juutiiba" + </voice> +</phrase> +<phrase> + id: LANG_HIGH + desc: in settings_menu + user: core + <source> + *: none + gigabeatfx: "High" + </source> + <dest> + *: none + gigabeatfx: "Augsts" + </dest> + <voice> + *: none + gigabeatfx: "augsts" + </voice> +</phrase> +<phrase> + id: LANG_SERIAL_BITRATE + desc: in system settings menu + user: core + <source> + *: none + serial_port: "Serial Bitrate" + </source> + <dest> + *: none + serial_port: "SeriÄlais Bitreits" + </dest> + <voice> + *: none + serial_port: "seriaalais bitreits" + </voice> +</phrase> +<phrase> + id: LANG_SERIAL_BITRATE_AUTO + desc: in system settings menu + user: core + <source> + *: none + serial_port: "Auto" + </source> + <dest> + *: none + serial_port: "AutomÄtiski" + </dest> + <voice> + *: none + serial_port: "automaatiski" + </voice> +</phrase> +<phrase> + id: LANG_SERIAL_BITRATE_9600 + desc: in system settings menu + user: core + <source> + *: none + serial_port: "9600" + </source> + <dest> + *: none + serial_port: "9600" + </dest> + <voice> + *: none + serial_port: "9600" + </voice> +</phrase> +<phrase> + id: LANG_SERIAL_BITRATE_19200 + desc: in system settings menu + user: core + <source> + *: none + serial_port: "19200" + </source> + <dest> + *: none + serial_port: "19200" + </dest> + <voice> + *: none + serial_port: "19200" + </voice> +</phrase> +<phrase> + id: LANG_SERIAL_BITRATE_38400 + desc: in system settings menu + user: core + <source> + *: none + serial_port: "38400" + </source> + <dest> + *: none + serial_port: "38400" + </dest> + <voice> + *: none + serial_port: "38400" + </voice> +</phrase> +<phrase> + id: LANG_SERIAL_BITRATE_57600 + desc: in system settings menu + user: core + <source> + *: none + serial_port: "57600" + </source> + <dest> + *: none + serial_port: "57600" + </dest> + <voice> + *: none + serial_port: "57600" + </voice> +</phrase> +<phrase> + id: LANG_VERY_SLOW + desc: in settings_menu + user: core + <source> + *: "Very slow" + </source> + <dest> + *: "Ä»oti LÄ“ns" + </dest> + <voice> + *: "ljoti leens" + </voice> +</phrase> +<phrase> + id: LANG_SLOW + desc: in settings_menu + user: core + <source> + *: "Slow" + </source> + <dest> + *: "LÄ“ns" + </dest> + <voice> + *: "leens" + </voice> +</phrase> +<phrase> + id: LANG_VERY_FAST + desc: in settings_menu + user: core + <source> + *: "Very fast" + </source> + <dest> + *: "Ä»oti Ä€trs" + </dest> + <voice> + *: "ljoti aatrs" + </voice> +</phrase> +<phrase> + id: LANG_FAST + desc: in settings_menu + user: core + <source> + *: "Fast" + </source> + <dest> + *: "Ä€trs" + </dest> + <voice> + *: "aatrs" + </voice> +</phrase> +<phrase> + id: LANG_SKIP_LENGTH + desc: playback settings menu + user: core + <source> + *: "Skip Length" + </source> + <dest> + *: "IzlaiÅ¡anas Garums" + </dest> + <voice> + *: "izlaishanas garums" + </voice> +</phrase> +<phrase> + id: LANG_SKIP_TRACK + desc: skip length setting entry 0 + user: core + <source> + *: "Skip Track" + </source> + <dest> + *: "Izlaist Dziesmu" + </dest> + <voice> + *: "izlaist dziesmu" + </voice> +</phrase> +<phrase> + id: VOICE_CHAR_SLASH + desc: spoken only, for spelling + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "sliipsviitra" + </voice> +</phrase> +<phrase> + id: LANG_GAIN_LEFT + desc: in the recording screen + user: core + <source> + *: none + recording: "Gain L" + </source> + <dest> + *: none + recording: "Kreisais KanÄls" + </dest> + <voice> + *: none + recording: "kreisaa kanaala pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_GAIN_RIGHT + desc: in the recording screen + user: core + <source> + *: none + recording: "Gain R" + </source> + <dest> + *: none + recording: "Labais KanÄls" + </dest> + <voice> + *: none + recording: "labaa kanaala pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_AGC_PRESET + desc: automatic gain control in record settings and screen + user: core + <source> + *: none + agc: "AGC" + </source> + <dest> + *: none + agc: "APR" + </dest> + <voice> + *: none + agc: "automaatiska pastiprinaajuma regulaacija" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_AGC_CLIPTIME + desc: in record settings + user: core + <source> + *: none + agc: "AGC clip time" + </source> + <dest> + *: none + agc: "APR Ätrums" + </dest> + <voice> + *: none + agc: "automaatiskaas pastiprinaajuma regulaacijas aatrums" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_AGC_MAXGAIN + desc: AGC maximum gain in recording screen + user: core + <source> + *: none + agc: "AGC max. gain" + </source> + <dest> + *: none + agc: "APR maks.skaļums" + </dest> + <voice> + *: none + agc: "automaatiskaas pastiprinaajuma regulaacijas maksimaalais skaljums" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_FILENAME + desc: Filename header in recording screen + user: core + <source> + *: none + recording: "Filename:" + </source> + <dest> + *: none + recording: "Faila nosaukums:" + </dest> + <voice> + *: none + recording: "" + </voice> +</phrase> +<phrase> + id: LANG_PM_CLIPCOUNT + desc: in recording GUI, for recording peak meter. MAX 5 characters! + user: core + <source> + *: none + recording: "CLIP:" + </source> + <dest> + *: none + recording: "PÄ€RSN:" + </dest> + <voice> + *: none + recording: "" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_TIMESPLIT_REC + desc: Display of record timer interval setting, on the record screen + user: core + <source> + *: none + recording: "Split Time:" + </source> + <dest> + *: none + recording: "PÄrtraukuma Laiks:" + </dest> + <voice> + *: none + recording: "" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_SIZE + desc: Display of recorded file size + user: core + <source> + *: none + recording: "Size:" + </source> + <dest> + *: none + recording: "IzmÄ“rs:" + </dest> + <voice> + *: none + recording: "" + </voice> +</phrase> +<phrase> + id: LANG_RECORDING_MONO_MODE + desc: in the recording settings + user: core + <source> + *: none + recording_swcodec: "Mono mode" + </source> + <dest> + *: none + recording_swcodec: "Mono režīms" + </dest> + <voice> + *: none + recording_swcodec: "mono rezhiims" + </voice> +</phrase> +<phrase> + id: LANG_SEARCH_RESULTS + desc: title for the list of results displayed after searching in a playlist + user: core + <source> + *: "Search Results" + </source> + <dest> + *: "Meklēšanas RezultÄti" + </dest> + <voice> + *: "mekleeshanas rezultaati" + </voice> +</phrase> +<phrase> + id: LANG_LEFT + desc: Generic use of 'left' + user: core + <source> + *: "Left" + </source> + <dest> + *: "Pa Kreisi" + </dest> + <voice> + *: "pa kreisi" + </voice> +</phrase> +<phrase> + id: LANG_RIGHT + desc: Generic use of 'right' + user: core + <source> + *: "Right" + </source> + <dest> + *: "Pa Labi" + </dest> + <voice> + *: "pa labi" + </voice> +</phrase> +<phrase> + id: LANG_RESET_SETTING + desc: used in the settings context menu + user: core + <source> + *: "Reset Setting" + </source> + <dest> + *: "Atjaunot UzstÄdÄ«jumu" + </dest> + <voice> + *: "atjaunot uzstaadiijumu" + </voice> +</phrase> +<phrase> + id: LANG_LEFT_QS_ITEM + desc: used for the submenu name for the quickscreen items + user: core + <source> + *: none + quickscreen: "Set as Left Quickscreen Item" + </source> + <dest> + *: none + quickscreen: "Uzlikt KÄ Kr.Ä€tro UzstÄdÄ«jumu" + </dest> + <voice> + *: none + quickscreen: "uzlikt kaa kreiso aatro uzstaadiijumu" + </voice> +</phrase> +<phrase> + id: LANG_RIGHT_QS_ITEM + desc: used for the submenu name for the quickscreen items + user: core + <source> + *: none + quickscreen: "Set as Right Quickscreen Item" + </source> + <dest> + *: none + quickscreen: "Uzlikt KÄ L.Ä€tro UzstÄdÄ«jumu" + </dest> + <voice> + *: none + quickscreen: "uzliklt kaa labo aatro uzstaadiijumu" + </voice> +</phrase> +<phrase> + id: LANG_BOTTOM_QS_ITEM + desc: used for the submenu name for the quickscreen items + user: core + <source> + *: none + quickscreen: "Set as Bottom Quickscreen Item" + </source> + <dest> + *: none + quickscreen: "Uzlikt KÄ Ap.Ä€tro UzstÄdÄ«jumu" + </dest> + <voice> + *: none + quickscreen: "uzlikt kaa apaksheejo aatro uzstaadiijumu" + </voice> +</phrase> +<phrase> + id: LANG_CREDITS + desc: in the Main Menu -> System screen + user: core + <source> + *: "Credits" + </source> + <dest> + *: "PateicÄ«bas" + </dest> + <voice> + *: "pateiciibas" + </voice> +</phrase> +<phrase> + id: LANG_SORT_INTERPRET_NUMBERS + desc: in Settings -> File view + user: core + <source> + *: "Interpret numbers when sorting" + </source> + <dest> + *: "Numuru InterpretÄcija KÄrtojot" + </dest> + <voice> + *: "numuru interpretaacija kaartojot" + </voice> +</phrase> +<phrase> + id: LANG_SORT_INTERPRET_AS_DIGIT + desc: in Settings -> File view + user: core + <source> + *: "As digits" + </source> + <dest> + *: "KÄ ciparus" + </dest> + <voice> + *: "kaa ciparus" + </voice> +</phrase> +<phrase> + id: LANG_SORT_INTERPRET_AS_NUMBERS + desc: in Settings -> File view + user: core + <source> + *: "As whole numbers" + </source> + <dest> + *: "KÄ numurus" + </dest> + <voice> + *: "kaa numurus" + </voice> +</phrase> +<phrase> + id: LANG_ENABLE_SPEAKER + desc: in Settings -> Sound Settings + user: core + <source> + *: none + speaker: "Enable Speaker" + </source> + <dest> + *: none + speaker: "IeslÄ“gt Skaļruni" + </dest> + <voice> + *: none + speaker: "iesleegt skaljruni" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHSCREEN_MODE + desc: in Settings -> General -> Display -> Touchscreen Settings + user: core + <source> + *: none + touchscreen: "Touchscreen Mode" + </source> + <dest> + *: none + touchscreen: "SkÄrienjÅ«tÄ«gais EkrÄns" + </dest> + <voice> + *: none + touchscreen: "skaarienjuutiigais ekraans" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHSCREEN_GRID + desc: in Settings -> General -> Display -> Touchscreen Settings + user: core + <source> + *: none + touchscreen: "3x3 Grid" + </source> + <dest> + *: none + touchscreen: "3x3 TÄ«kls" + </dest> + <voice> + *: none + touchscreen: "triis reiz triis tiikls" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHSCREEN_POINT + desc: in Settings -> General -> Display -> Touchscreen Settings + user: core + <source> + *: none + touchscreen: "Absolute Point" + </source> + <dest> + *: none + touchscreen: "AbsolÅ«tais Punkts" + </dest> + <voice> + *: none + touchscreen: "absoluutais punkts" + </voice> +</phrase> +<phrase> + id: LANG_PREVENT_SKIPPING + desc: in Settings -> Playback Settings + user: core + <source> + *: "Prevent Track Skipping" + </source> + <dest> + *: "NovÄ“rst Dziesmu IzlaiÅ¡anu" + </dest> + <voice> + *: "noveerst dziesmu izlaishanu" + </voice> +</phrase> +<phrase> + id: LANG_TIMESTRETCH + desc: timestretch enable + user: core + <source> + *: none + swcodec: "Timestretch" + </source> + <dest> + *: none + swcodec: "Ä€truma Maiņa" + </dest> + <voice> + *: none + swcodec: "aatruma mainja" + </voice> +</phrase> +<phrase> + id: LANG_SPEED + desc: timestretch speed + user: core + <source> + *: none + swcodec: "Speed" + </source> + <dest> + *: none + swcodec: "Ä€trums" + </dest> + <voice> + *: none + swcodec: "aatrums" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHSCREEN_SETTINGS + desc: in Settings -> General -> Display menu + user: core + <source> + *: none + touchscreen: "Touchscreen Settings" + </source> + <dest> + *: none + touchscreen: "Sk.EkrÄna UzstÄdÄ«jumi" + </dest> + <voice> + *: none + touchscreen: "skaarienjuutiigaa ekraana uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHSCREEN_CALIBRATE + desc: in Settings -> General -> Display -> Touchscreen Settings + user: core + <source> + *: none + touchscreen: "Calibrate" + </source> + <dest> + *: none + touchscreen: "KalibrÄ“t" + </dest> + <voice> + *: none + touchscreen: "kalibreet" + </voice> +</phrase> +<phrase> + id: LANG_TOUCHSCREEN_RESET_CALIBRATION + desc: in Settings -> General -> Display -> Touchscreen Settings + user: core + <source> + *: none + touchscreen: "Reset Calibration" + </source> + <dest> + *: none + touchscreen: "IzdzÄ“st KalibrÄciju" + </dest> + <voice> + *: none + touchscreen: "izdzeest kalibraaciju" + </voice> +</phrase> +<phrase> + id: LANG_STATUSBAR_TOP + desc: in Settings -> General -> Display -> statusbar + user: core + <source> + *: "Top" + </source> + <dest> + *: "AugÅ¡Ä" + </dest> + <voice> + *: "augshaa" + </voice> +</phrase> +<phrase> + id: LANG_STATUSBAR_BOTTOM + desc: in Settings -> General -> Display -> statusbar + user: core + <source> + *: "Bottom" + </source> + <dest> + *: "ApakÅ¡Ä" + </dest> + <voice> + *: "apakshaa" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_STATUSBAR + desc: in Settings -> General -> Display -> statusbar + user: core + <source> + *: none + remote: "Remote Statusbar" + </source> + <dest> + *: none + remote: "Pults Statusajosla" + </dest> + <voice> + *: none + remote: "pults statusa josla" + </voice> +</phrase> +<phrase> + id: LANG_SEMITONE + desc: + user: core + <source> + *: none + pitchscreen: "Semitone" + </source> + <dest> + *: none + pitchscreen: "Pustonis" + </dest> + <voice> + *: none + pitchscreen: "pustonis" + </voice> +</phrase> +<phrase> + id: LANG_STRETCH_LIMIT + desc: "limit" in pitch screen + user: core + <source> + *: none + pitchscreen: "Limit" + </source> + <dest> + *: none + pitchscreen: "Ierobežojums" + </dest> + <voice> + *: none + pitchscreen: "ierobezhojums" + </voice> +</phrase> +<phrase> + id: LANG_PLAYBACK_RATE + desc: "rate" in pitch screen + user: core + <source> + *: none + pitchscreen: "Rate" + </source> + <dest> + *: none + pitchscreen: "Ä€trums" + </dest> + <voice> + *: none + pitchscreen: "aatrums" + </voice> +</phrase> +<phrase> + id: LANG_USB_KEYPAD_MODE + desc: in settings_menu + user: core + <source> + *: none + usb_hid: "USB Keypad Mode" + </source> + <dest> + *: none + usb_hid: "USB KlaviatÅ«ras Režīms" + </dest> + <voice> + *: none + usb_hid: "uuesbee klaviatuuras rezhiims" + </voice> +</phrase> +<phrase> + id: LANG_MULTIMEDIA_MODE + desc: in settings_menu + user: core + <source> + *: none + usb_hid: "Multimedia" + </source> + <dest> + *: none + usb_hid: "MultimÄ“diju" + </dest> + <voice> + *: none + usb_hid: "multimeediju" + </voice> +</phrase> +<phrase> + id: LANG_PRESENTATION_MODE + desc: in settings_menu + user: core + <source> + *: none + usb_hid: "Presentation" + </source> + <dest> + *: none + usb_hid: "PrezentÄciju" + </dest> + <voice> + *: none + usb_hid: "prezentaaciju" + </voice> +</phrase> +<phrase> + id: LANG_BROWSER_MODE + desc: in settings_menu + user: core + <source> + *: none + usb_hid: "Browser" + </source> + <dest> + *: none + usb_hid: "PÄrlÅ«ks" + </dest> + <voice> + *: none + usb_hid: "paarluuka" + </voice> +</phrase> +<phrase> + id: LANG_MOUSE_MODE + desc: in settings_menu + user: core + <source> + *: none + usb_hid: "Mouse" + </source> + <dest> + *: none + usb_hid: "Pele" + </dest> + <voice> + *: none + usb_hid: "pele" + </voice> +</phrase> +<phrase> + id: LANG_SKIN_RAM_USAGE + desc: how much RAM the skins are using + user: core + <source> + *: "Skin RAM usage:" + </source> + <dest> + *: "Ä€das RAM izl.:" + </dest> + <voice> + *: "aadas ram izlietojums" + </voice> +</phrase> +<phrase> + id: LANG_SCROLLBAR_WIDTH + desc: in Settings -> General -> Display -> Status-/Scrollbar + user: core + <source> + *: none + lcd_bitmap: "Scroll Bar Width" + </source> + <dest> + *: none + lcd_bitmap: "Rulljoslas Platums" + </dest> + <voice> + *: none + lcd_bitmap: "rulljoslas platums" + </voice> +</phrase> +<phrase> + id: LANG_SCROLLBAR_POSITION + desc: in Settings -> General -> Display -> Status-/Scrollbar + user: core + <source> + *: none + lcd_bitmap: "Scroll Bar Position" + </source> + <dest> + *: none + lcd_bitmap: "Rulljoslas PozÄ«cija" + </dest> + <voice> + *: none + lcd_bitmap: "rulljoslas poziicija" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR + desc: in sound settings + user: core + <source> + *: none + swcodec: "Compressor" + </source> + <dest> + *: none + swcodec: "Kompresors" + </dest> + <voice> + *: none + swcodec: "kompresors" + </voice> +</phrase> +<phrase> + id: LANG_TOP_QS_ITEM + desc: used for the submenu name for the quickscreen items + user: core + <source> + *: none + quickscreen: "Set as Top Quickscreen Item" + </source> + <dest> + *: none + quickscreen: "Uzlikt KÄ Aug.Ä€tro UzstÄdÄ«jumu" + </dest> + <voice> + *: none + quickscreen: "uzlikt kaa augsheejo aatro uzstaadiijumu" + </voice> +</phrase> +<phrase> + id: LANG_FM_ITALY + desc: fm region Italy + user: core + <source> + *: none + radio: "Italy" + </source> + <dest> + *: none + radio: "ItÄlija" + </dest> + <voice> + *: none + radio: "itaalija" + </voice> +</phrase> +<phrase> + id: LANG_FM_OTHER + desc: Catch-all FM region. Select if none of the others work + user: core + <source> + *: none + radio: "Other" + </source> + <dest> + *: none + radio: "Cits" + </dest> + <voice> + *: none + radio: "cits" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_THRESHOLD + desc: in sound settings + user: core + <source> + *: none + swcodec: "Threshold" + </source> + <dest> + *: none + swcodec: "Slieksnis" + </dest> + <voice> + *: none + swcodec: "slieksnis" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RATIO + desc: in sound settings + user: core + <source> + *: none + swcodec: "Ratio" + </source> + <dest> + *: none + swcodec: "AttiecÄ«ba" + </dest> + <voice> + *: none + swcodec: "attieciiba" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RATIO_2 + desc: in sound settings + user: core + <source> + *: none + swcodec: "2:1" + </source> + <dest> + *: none + swcodec: "2:1" + </dest> + <voice> + *: none + swcodec: "divi pret vienu" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RATIO_4 + desc: in sound settings + user: core + <source> + *: none + swcodec: "4:1" + </source> + <dest> + *: none + swcodec: "4:1" + </dest> + <voice> + *: none + swcodec: "chetri pret vienu" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RATIO_6 + desc: in sound settings + user: core + <source> + *: none + swcodec: "6:1" + </source> + <dest> + *: none + swcodec: "6:1" + </dest> + <voice> + *: none + swcodec: "seshi pret vienu" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RATIO_10 + desc: in sound settings + user: core + <source> + *: none + swcodec: "10:1" + </source> + <dest> + *: none + swcodec: "10:1" + </dest> + <voice> + *: none + swcodec: "desmit pret vienu" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RATIO_LIMIT + desc: in sound settings + user: core + <source> + *: none + swcodec: "Limit" + </source> + <dest> + *: none + swcodec: "Ierobežojums" + </dest> + <voice> + *: none + swcodec: "ierobezhojums" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_GAIN + desc: in sound settings + user: core + <source> + *: none + swcodec: "Makeup Gain" + </source> + <dest> + *: none + swcodec: "Beigu PastiprinÄjums" + </dest> + <voice> + *: none + swcodec: "beigu pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_AUTO + desc: in sound settings + user: core + <source> + *: none + swcodec: "Auto" + </source> + <dest> + *: none + swcodec: "AutomÄtisks" + </dest> + <voice> + *: none + swcodec: "automaatisks" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_KNEE + desc: in sound settings + user: core + <source> + *: none + swcodec: "Knee" + </source> + <dest> + *: none + swcodec: "PÄreja" + </dest> + <voice> + *: none + swcodec: "paareja" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_HARD_KNEE + desc: in sound settings + user: core + <source> + *: none + swcodec: "Hard Knee" + </source> + <dest> + *: none + swcodec: "Asa PÄreja" + </dest> + <voice> + *: none + swcodec: "asa paareja" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_SOFT_KNEE + desc: in sound settings + user: core + <source> + *: none + swcodec: "Soft Knee" + </source> + <dest> + *: none + swcodec: "IzlÄ«dzinÄta PÄreja" + </dest> + <voice> + *: none + swcodec: "izliidzinaata paareja" + </voice> +</phrase> +<phrase> + id: LANG_COMPRESSOR_RELEASE + desc: in sound settings + user: core + <source> + *: none + swcodec: "Release Time" + </source> + <dest> + *: none + swcodec: "SamazinÄÅ¡anas Laiks" + </dest> + <voice> + *: none + swcodec: "samazinaashanas laiks" + </voice> +</phrase> +<phrase> + id: LANG_SKIP_OUTRO + desc: skipping to the 5 seconds before the end of a track + user: core + <source> + *: "Skip to Outro" + </source> + <dest> + *: "PÄrslÄ“gt Uz BeigÄm" + </dest> + <voice> + *: "paarsleegt uz beigaam" + </voice> +</phrase> +<phrase> + id: LANG_STATUSBAR_CUSTOM + desc: if this translation is compatible with LANG_CHANNEL_CUSTOM, then please use the same translation. it can be combined later then + user: core + <source> + *: "Custom" + </source> + <dest> + *: "Nestandarta" + </dest> + <voice> + *: "nestandarta" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_SBS + desc: spoken only, for file extension + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "statusa joslas aada" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_RSBS + desc: spoken only, for file extension + user: core + <source> + *: none + remote: "" + </source> + <dest> + *: none + remote: "" + </dest> + <voice> + *: none + remote: "pults statusa joslas aada" + </voice> +</phrase> +<phrase> + id: LANG_USB_HID + desc: in settings_menu + user: core + <source> + *: none + usb_hid: "USB HID" + </source> + <dest> + *: none + usb_hid: "USB Ievades IerÄ«ce" + </dest> + <voice> + *: none + usb_hid: "uuesbee ievades ieriice" + </voice> +</phrase> +<phrase> + id: LANG_INSERT_LAST_SHUFFLED + desc: in onplay menu. insert a playlist randomly at end of dynamic playlist + user: core + <source> + *: "Insert Last Shuffled" + </source> + <dest> + *: "Ievietot Sajaukti BeigÄs" + </dest> + <voice> + *: "ievietot sajaukti beigaas" + </voice> +</phrase> +<phrase> + id: LANG_QUEUE_LAST_SHUFFLED + desc: in onplay menu. queue a playlist randomly at end of dynamic playlist + user: core + <source> + *: "Queue Last Shuffled" + </source> + <dest> + *: "Ielikt Sajaukti RindÄ" + </dest> + <voice> + *: "ielikt sajaukti rindaa" + </voice> +</phrase> +<phrase> + id: LANG_MORSE_INPUT + desc: in Settings -> System + user: core + <source> + *: none + morse_input: "Use Morse Code Input" + </source> + <dest> + *: none + morse_input: "Izmantot Morzes Ievadi" + </dest> + <voice> + *: none + morse_input: "izmantot morzes ievadi" + </voice> +</phrase> +<phrase> + id: LANG_AUTOTRACKSKIP + desc: in crossfade settings + user: core + <source> + *: none + crossfade: "Automatic Track Change Only" + </source> + <dest> + *: none + crossfade: "Tikai AutomÄtiski PÄrslÄ“dzoties" + </dest> + <voice> + *: none + crossfade: "tikai automaatiski paarsleedzoties" + </voice> +</phrase> +<phrase> + id: LANG_NEXT_TRACK + desc: Shown in WPS + user: core + <source> + *: "Next Track:" + </source> + <dest> + *: "NÄkamÄ Dziesma:" + </dest> + <voice> + *: "naakamaa dziesma" + </voice> +</phrase> +<phrase> + id: LANG_NEXT + desc: Shown in WPS (short form of Next Track) + user: core + <source> + *: "Next:" + </source> + <dest> + *: "NÄkamÄ:" + </dest> + <voice> + *: "naakamaa" + </voice> +</phrase> +<phrase> + id: LANG_OF + desc: Shown in WPS: X of Y (tracks) + user: core + <source> + *: "of" + </source> + <dest> + *: "no" + </dest> + <voice> + *: "no" + </voice> +</phrase> +<phrase> + id: LANG_BASE_SKIN + desc: browse for the base skin in theme settings + user: core + <source> + *: none + lcd_bitmap: "Base Skin" + </source> + <dest> + *: none + lcd_bitmap: "PamatÄda" + </dest> + <voice> + *: none + lcd_bitmap: "pamataada" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_BASE_SKIN + desc: browse for the base skin in theme settings + user: core + <source> + *: none + lcd_bitmap: "Remote Base Skin" + </source> + <dest> + *: none + lcd_bitmap: "Pults PamatÄda" + </dest> + <voice> + *: none + lcd_bitmap: "pults pamataada" + </voice> +</phrase> +<phrase> + id: LANG_MAIN_SCREEN + desc: in the main menu + user: core + <source> + *: none + remote: "Main Screen" + </source> + <dest> + *: none + remote: "IerÄ«ces EkrÄns" + </dest> + <voice> + *: none + remote: "ieriices ekraans" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_SCREEN + desc: in the main menu + user: core + <source> + *: none + remote: "Remote Screen" + </source> + <dest> + *: none + remote: "Pults EkrÄns" + </dest> + <voice> + *: none + remote: "pults ekraans" + </voice> +</phrase> +<phrase> + id: LANG_LINEOUT_ONOFF + desc: in system settings menu + user: core + <source> + *: none + lineout_poweroff: "Line Out" + </source> + <dest> + *: none + lineout_poweroff: "LineÄrÄ Izeja" + </dest> + <voice> + *: none + lineout_poweroff: "lineaaraa izeja" + </voice> +</phrase> +<phrase> + id: LANG_HOTKEY + desc: hotkey menu + user: core + <source> + *: none + hotkey: "Hotkey" + </source> + <dest> + *: none + hotkey: "Karstie Taustiņi" + </dest> + <voice> + *: none + hotkey: "karstie taustinji" + </voice> +</phrase> +<phrase> + id: LANG_HOTKEY_WPS + desc: hotkey menu + user: core + <source> + *: none + hotkey: "WPS Hotkey" + </source> + <dest> + *: none + hotkey: "Atskaņ. Loga Taustiņš" + </dest> + <voice> + *: none + hotkey: "atskanjoshanas loga taustinjsh" + </voice> +</phrase> +<phrase> + id: LANG_HOTKEY_FILE_BROWSER + desc: hotkey menu + user: core + <source> + *: none + hotkey: "File Browser Hotkey" + </source> + <dest> + *: none + hotkey: "Falu PÄrlÅ«ka Taustiņš" + </dest> + <voice> + *: none + hotkey: "failu paarluuka taustinjsh" + </voice> +</phrase> +<phrase> + id: LANG_RESUME_REWIND + desc: in playback settings menu + user: core + <source> + *: none + swcodec: "Rewind Before Resume" + </source> + <dest> + *: none + swcodec: "AttÄ«t Pirms AtsÄkt" + </dest> + <voice> + *: none + swcodec: "attiit pirms atsaakt" + </voice> +</phrase> +<phrase> + id: LANG_REMOTE_RADIOSCREEN + desc: in the theme menu + user: core + <source> + *: none + radio_remote: "Remote Radio Screen" + </source> + <dest> + *: none + radio_remote: "Pults Radio EkrÄns" + </dest> + <voice> + *: none + radio_remote: "pults radio ekraans" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_FMS + desc: spoken only, for file extension + user: core + <source> + *: none + radio: "" + </source> + <dest> + *: none + radio: "" + </dest> + <voice> + *: none + radio: "radio ekraana aada" + </voice> +</phrase> +<phrase> + id: VOICE_EXT_RFMS + desc: spoken only, for file extension + user: core + <source> + *: none + radio_remote: "" + </source> + <dest> + *: none + radio_remote: "" + </dest> + <voice> + *: none + radio_remote: "pults radio ekraana aada" + </voice> +</phrase> +<phrase> + id: LANG_FM_STATION_HEADER + desc: in radio screen + user: core + <source> + *: none + radio: "Station:" + </source> + <dest> + *: none + radio: "Stacija:" + </dest> + <voice> + *: none + radio: "" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_TONE_CONTROLS + desc: in sound_menu, hardware equalizer tone controls + user: core + <source> + *: none + gigabeats: "Tone Controls" + </source> + <dest> + *: none + gigabeats: "Toņa Kontroles" + </dest> + <voice> + *: none + gigabeats: "tonja kontroles" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_TONE_CONTROLS_ADVANCED + desc: in sound_menu, advanced settings for hardware equalizer tone controls + user: core + <source> + *: none + gigabeats: "Advanced Tone Control Settings" + </source> + <dest> + *: none + gigabeats: "Papildus Toņa Kontroles UzstÄdÄ«jumi" + </dest> + <voice> + *: none + gigabeats: "papildus tonja kontroles uzstaadiijumi" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_GAIN + desc: in sound_menu, hardware equalizer tone controls filter gain + user: core + <source> + *: none + gigabeats: "Band %d Gain" + </source> + <dest> + *: none + gigabeats: "Joslas %d PastiprinÄjums" + </dest> + <voice> + *: none + gigabeats: "joslas %d pastiprinaajums" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_FREQUENCY + desc: in sound_menu, hardware equalizer tone controls shelf filter cutoff frequency + user: core + <source> + *: none + gigabeats: "Band %d Frequency" + </source> + <dest> + *: none + gigabeats: "Joslas %d Frekvence" + </dest> + <voice> + *: none + gigabeats: "joslas %d frekvence" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_WIDTH + desc: in sound_menu, hardware equalizer tone controls peak bandwith setting + user: core + <source> + *: none + gigabeats: "Band %d Width" + </source> + <dest> + *: none + gigabeats: "Joslas %d Platums" + </dest> + <voice> + *: none + gigabeats: "joslas %d platums" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_WIDTH_NARROW + desc: in sound_menu, hardware equalizer tone controls narrow bandwith setting + user: core + <source> + *: none + gigabeats: "Narrow" + </source> + <dest> + *: none + gigabeats: "Å aurs" + </dest> + <voice> + *: none + gigabeats: "shaurs" + </voice> +</phrase> +<phrase> + id: LANG_HW_EQ_WIDTH_WIDE + desc: in sound_menu, hardware equalizer tone controls wide bandwidth setting + user: core + <source> + *: none + gigabeats: "Wide" + </source> + <dest> + *: none + gigabeats: "Plats" + </dest> + <voice> + *: none + gigabeats: "plats" + </voice> +</phrase> +<phrase> + id: LANG_DEPTH_3D + desc: in sound_menu, amount of 3D enhancement effect + user: core + <source> + *: none + gigabeats,mpiohd200,mpiohd300: "3-D Enhancement" + </source> + <dest> + *: none + gigabeats,mpiohd200,mpiohd300: "3-D PaplaÅ¡inÄjums" + </dest> + <voice> + *: none + gigabeats,mpiohd200,mpiohd300: "triis dimensiju paplashinaajums" + </voice> +</phrase> +<phrase> + id: LANG_TAGNAVI_UNTAGGED + desc: "<untagged>" entry in tag browser + user: core + <source> + *: "<Untagged>" + </source> + <dest> + *: "<NeatzÄ«mÄ“ts>" + </dest> + <voice> + *: "neatziimeets" + </voice> +</phrase> +<phrase> + id: LANG_RADIOSCREEN + desc: in the theme menu + user: core + <source> + *: none + radio: "Radio Screen" + </source> + <dest> + *: none + radio: "Radio EkrÄns" + </dest> + <voice> + *: none + radio: "eadio ekraans" + </voice> +</phrase> +<phrase> + id: LANG_ID3_COMPOSER + desc: in tag viewer + user: core + <source> + *: "Composer" + </source> + <dest> + *: "Komponists" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_FORCE + desc: alternative to yes/no for tristate settings + user: core + <source> + *: "Force" + </source> + <dest> + *: "Piespiest" + </dest> + <voice> + *: "piespiest" + </voice> +</phrase> +<phrase> + id: LANG_ONPLAY_PICTUREFLOW + desc: Onplay pictureflow + user: core + <source> + *: "PictureFlow" + </source> + <dest> + *: "AttÄ“lu PlÅ«sma" + </dest> + <voice> + *: "atveert atteelu pluusmu" + </voice> +</phrase> +<phrase> + id: LANG_KBD_OK + desc: in keyboard + user: core + <source> + *: none + touchscreen: "OK" + </source> + <dest> + *: none + touchscreen: "Labi" + </dest> + <voice> + *: none + touchscreen: "labi" + </voice> +</phrase> +<phrase> + id: LANG_KBD_DELETE + desc: in keyboard + user: core + <source> + *: none + touchscreen: "Del" + </source> + <dest> + *: none + touchscreen: "Izdz" + </dest> + <voice> + *: none + touchscreen: "izdzeest" + </voice> +</phrase> +<phrase> + id: LANG_KBD_CANCEL + desc: in keyboard + user: core + <source> + *: none + touchscreen: "Cancel" + </source> + <dest> + *: none + touchscreen: "Atteikties" + </dest> + <voice> + *: none + touchscreen: "atteikties" + </voice> +</phrase> +<phrase> + id: LANG_BOOKMARK_SETTINGS_AUTOUPDATE + desc: prompt for user to decide whether to update bookmarks + user: core + <source> + *: "Update on Stop" + </source> + <dest> + *: "Atjaunot ApstÄjoties" + </dest> + <voice> + *: "atjaunot apstaajoties" + </voice> +</phrase> +<phrase> + id: LANG_SET_AS_START_DIR + desc: used in the onplay menu to set a starting browser dir + user: core + <source> + *: "Start File Browser Here" + </source> + <dest> + *: "Palaist Å eit Failu PÄrlÅ«ku" + </dest> + <voice> + *: "palaist sheit failu paarluuku" + </voice> +</phrase> +<phrase> + id: LANG_RESET_START_DIR + desc: reset the browser start directory + user: core + <source> + *: "Start File Browser at /" + </source> + <dest> + *: "PÄrstatÄ«t Failu PÄrlÅ«ku uz /" + </dest> + <voice> + *: "paarstatiit failu paarluuku uz pamatmapi" + </voice> +</phrase> +<phrase> + id: LANG_FM_RSSI + desc: Signal strength of a received FM station + user: core + <source> + *: none + radio: "Signal strength:" + </source> + <dest> + *: none + radio: "SignÄla Stiprums:" + </dest> + <voice> + *: none + radio: "signaala stiprums" + </voice> +</phrase> +<phrase> + id: LANG_FILESIZE + desc: in record timesplit options and in track information viewer + user: core + <source> + *: "Filesize" + </source> + <dest> + *: "IzmÄ“rs" + </dest> + <voice> + *: "izmeers" + </voice> +</phrase> +<phrase> + id: LANG_AUTORESUME_ENABLE + desc: deprecated + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_AUTORESUME_ENABLE_YES + desc: deprecated + user: core + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "" + </voice> +</phrase> +<phrase> + id: LANG_AUTORESUME + desc: resume settings menu + user: core + <source> + *: "Automatic resume" + </source> + <dest> + *: "AtsÄkt AutomÄtiski" + </dest> + <voice> + *: "atsaakt automaatiski" + </voice> +</phrase> +<phrase> + id: LANG_AUTORESUME_AUTOMATIC + desc: resume on automatic track change + user: core + <source> + *: "Resume on automatic track change" + </source> + <dest> + *: "AtsÄkt AutomÄtiski PÄrslÄ“dzoties" + </dest> + <voice> + *: "atsaakt automaatiski paarsleedzoties" + </voice> +</phrase> +<phrase> + id: LANG_AUTORESUME_CUSTOM + desc: enable customization of resume on automatic track change + user: core + <source> + *: "In custom directories only" + </source> + <dest> + *: "Tikai NorÄdÄ«tÄs MapÄ“s" + </dest> + <voice> + *: "tikai noraadiitaas mapees" + </voice> +</phrase> +<phrase> + id: LANG_PAUSE_REWIND + desc: Seconds to rewind when rewind on pause is enabled. + user: core + <source> + *: "Rewind on Pause" + </source> + <dest> + *: "AttÄ«t NopauzÄ“jot" + </dest> + <voice> + *: "attiit nopauzeejot" + </voice> +</phrase> +<phrase> + id: LANG_CURRENT_PLAYLIST + desc: Used when you need to say playlist, also voiced + user: core + <source> + *: "Current Playlist" + </source> + <dest> + *: "°PatreizÄ“jais Saraksts" + </dest> + <voice> + *: "patreizeejais saraksts" + </voice> +</phrase> +<phrase> + id: LANG_USB_SKIP_FIRST_DRIVE + desc: in settings_menu + user: core + <source> + *: none + multidrive_usb: "USB Hide Internal Drive" + </source> + <dest> + *: none + multidrive_usb: "Savienojoties PaslÄ“pt Iekšējo Disku" + </dest> + <voice> + *: none + multidrive_usb: "savienojoties pasleept ieksheejo disku" + </voice> +</phrase> +<phrase> + id: LANG_SET_AS_PLAYLISTCAT_DIR + desc: used in the onplay menu to set a playlist catalogue dir + user: core + <source> + *: "Set As Playlist Catalogue Directory" + </source> + <dest> + *: "Uzlikt KÄ Sarakstu Kataloga Mapi" + </dest> + <voice> + *: "uzlikt kaa sarakstu kataloga mapi" + </voice> +</phrase> +<phrase> + id: LANG_SAVE_CHANGES + desc: When you try to exit screens to confirm save + user: core + <source> + *: "Save Changes?" + </source> + <dest> + *: "SaglabÄt Izmaiņas?" + </dest> + <voice> + *: "vai saglabaat izmainjas" + </voice> +</phrase> +<phrase> + id: LANG_RESET_PLAYLISTCAT_DIR + desc: + user: core + <source> + *: "Reset Playlist Catalogue Directory" + </source> + <dest> + *: "PÄrstatÄ«t Sarakstu Kataloga Mapi" + </dest> + <voice> + *: "paarstatiit sarakstu kataloga mapi" + </voice> +</phrase> +<phrase> + id: LANG_HISTOGRAM_INTERVAL + desc: in record settings menu + user: core + <source> + *: none + histogram: "Histogram interval" + </source> + <dest> + *: none + histogram: "VizualizÄcijas IntervÄls" + </dest> + <voice> + *: none + histogram: "vizualizaacijas intervaals" + </voice> +</phrase> diff --git a/firmware/drivers/audio/cs42l55.c b/firmware/drivers/audio/cs42l55.c index c81a3fc..38380d5 100644 --- a/firmware/drivers/audio/cs42l55.c +++ b/firmware/drivers/audio/cs42l55.c @@ -1,245 +1,245 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: wm8975.c 28572 2010-11-13 11:38:38Z theseven $
- *
- * Driver for Cirrus Logic CS42L55 audio codec
- *
- * Copyright (c) 2010 Michael Sparmann
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "logf.h"
-#include "system.h"
-#include "string.h"
-#include "audio.h"
-#include "sound.h"
-#include "audiohw.h"
-#include "cscodec.h"
-#include "cs42l55.h"
-
-const struct sound_settings_info audiohw_settings[] = {
- [SOUND_VOLUME] = {"dB", 0, 1, -60, 12, -25},
- [SOUND_BASS] = {"dB", 1, 15,-105, 120, 0},
- [SOUND_TREBLE] = {"dB", 1, 15,-105, 120, 0},
- [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
- [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
- [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
- [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 2},
- [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
-};
-
-static int bass, treble;
-
-/* convert tenth of dB volume (-600..120) to master volume register value */
-int tenthdb2master(int db)
-{
- /* -60dB to +12dB in 1dB steps */
- /* 0001100 == +12dB (0xc) */
- /* 0000000 == 0dB (0x0) */
- /* 1000100 == -60dB (0x44, this is actually -58dB) */
-
- if (db < VOLUME_MIN) return HPACTL_HPAMUTE;
- return (db / 10) & HPACTL_HPAVOL_MASK;
-}
-
-static void cscodec_setbits(int reg, unsigned char off, unsigned char on)
-{
- unsigned char data = (cscodec_read(reg) & ~off) | on;
- cscodec_write(reg, data);
-}
-
-static void audiohw_mute(bool mute)
-{
- if (mute) cscodec_setbits(PLAYCTL, 0, PLAYCTL_MSTAMUTE | PLAYCTL_MSTBMUTE);
- else cscodec_setbits(PLAYCTL, PLAYCTL_MSTAMUTE | PLAYCTL_MSTBMUTE, 0);
-}
-
-void audiohw_preinit(void)
-{
- cscodec_power(true);
- cscodec_clock(true);
- cscodec_reset(true);
- sleep(HZ / 100);
- cscodec_reset(false);
-
- bass = 0;
- treble = 0;
-
- /* Ask Cirrus or maybe Apple what the hell this means */
- cscodec_write(HIDDENCTL, HIDDENCTL_UNLOCK);
- cscodec_write(HIDDEN2E, HIDDEN2E_DEFAULT);
- cscodec_write(HIDDEN32, HIDDEN32_DEFAULT);
- cscodec_write(HIDDEN33, HIDDEN33_DEFAULT);
- cscodec_write(HIDDEN34, HIDDEN34_DEFAULT);
- cscodec_write(HIDDEN35, HIDDEN35_DEFAULT);
- cscodec_write(HIDDEN36, HIDDEN36_DEFAULT);
- cscodec_write(HIDDEN37, HIDDEN37_DEFAULT);
- cscodec_write(HIDDEN3A, HIDDEN3A_DEFAULT);
- cscodec_write(HIDDEN3C, HIDDEN3C_DEFAULT);
- cscodec_write(HIDDEN3D, HIDDEN3D_DEFAULT);
- cscodec_write(HIDDEN3E, HIDDEN3E_DEFAULT);
- cscodec_write(HIDDEN3F, HIDDEN3F_DEFAULT);
- cscodec_write(HIDDENCTL, HIDDENCTL_LOCK);
-
- cscodec_write(PWRCTL2, PWRCTL2_PDN_LINA_ALWAYS | PWRCTL2_PDN_LINB_ALWAYS
- | PWRCTL2_PDN_HPA_NEVER | PWRCTL2_PDN_HPB_NEVER);
- cscodec_write(CLKCTL1, CLKCTL1_MASTER | CLKCTL1_SCLKMCLK_BEFORE
- | CLKCTL1_MCLKDIV2);
- cscodec_write(CLKCTL2, CLKCTL2_44100HZ);
- cscodec_write(MISCCTL, MISCCTL_UNDOC4 | MISCCTL_ANLGZC | MISCCTL_DIGSFT);
- cscodec_write(PWRCTL1, PWRCTL1_PDN_CHRG | PWRCTL1_PDN_ADCA
- | PWRCTL1_PDN_ADCB | PWRCTL1_PDN_CODEC);
- cscodec_write(PLAYCTL, PLAYCTL_PDN_DSP
- | PLAYCTL_MSTAMUTE | PLAYCTL_MSTBMUTE);
- cscodec_write(PGAACTL, 0);
- cscodec_write(PGABCTL, 0);
- cscodec_write(HPACTL, HPACTL_HPAMUTE);
- cscodec_write(HPBCTL, HPBCTL_HPBMUTE);
- cscodec_write(LINEACTL, LINEACTL_LINEAMUTE);
- cscodec_write(LINEBCTL, LINEBCTL_LINEBMUTE);
- cscodec_write(PWRCTL1, PWRCTL1_PDN_CHRG | PWRCTL1_PDN_ADCA
- | PWRCTL1_PDN_ADCB);
-}
-
-void audiohw_postinit(void)
-{
- cscodec_write(HPACTL, 0);
- cscodec_write(HPBCTL, 0);
- cscodec_write(LINEACTL, 0);
- cscodec_write(LINEBCTL, 0);
- cscodec_write(CLSHCTL, CLSHCTL_ADPTPWR_SIGNAL);
- audiohw_mute(false);
-}
-
-void audiohw_set_master_vol(int vol_l, int vol_r)
-{
- /* -60dB to +12dB in 1dB steps */
- /* 0001100 == +12dB (0xc) */
- /* 0000000 == 0dB (0x0) */
- /* 1000100 == -60dB (0x44, this is actually -58dB) */
-
- cscodec_setbits(HPACTL, HPACTL_HPAVOL_MASK | HPACTL_HPAMUTE,
- vol_l << HPACTL_HPAVOL_SHIFT);
- cscodec_setbits(HPBCTL, HPBCTL_HPBVOL_MASK | HPBCTL_HPBMUTE,
- vol_r << HPBCTL_HPBVOL_SHIFT);
-}
-
-void audiohw_set_lineout_vol(int vol_l, int vol_r)
-{
- /* -60dB to +12dB in 1dB steps */
- /* 0001100 == +12dB (0xc) */
- /* 0000000 == 0dB (0x0) */
- /* 1000100 == -60dB (0x44, this is actually -58dB) */
-
- cscodec_setbits(LINEACTL, LINEACTL_LINEAVOL_MASK | LINEACTL_LINEAMUTE,
- vol_l << LINEACTL_LINEAVOL_SHIFT);
- cscodec_setbits(LINEBCTL, LINEBCTL_LINEBVOL_MASK | LINEBCTL_LINEBMUTE,
- vol_r << LINEBCTL_LINEBVOL_SHIFT);
-}
-
-void audiohw_enable_lineout(bool enable)
-{
- if (enable)
- cscodec_setbits(PWRCTL2, PWRCTL2_PDN_LINA_MASK | PWRCTL2_PDN_LINB_MASK,
- PWRCTL2_PDN_LINA_NEVER | PWRCTL2_PDN_LINB_NEVER);
- else
- cscodec_setbits(PWRCTL2, PWRCTL2_PDN_LINA_MASK | PWRCTL2_PDN_LINB_MASK,
- PWRCTL2_PDN_LINA_ALWAYS | PWRCTL2_PDN_LINB_ALWAYS);
-}
-
-static void handle_dsp_power(void)
-{
- if (bass || treble)
- {
- cscodec_setbits(PLAYCTL, PLAYCTL_PDN_DSP, 0);
- cscodec_setbits(BTCTL, 0, BTCTL_TCEN);
- }
- else
- {
- cscodec_setbits(BTCTL, BTCTL_TCEN, 0);
- cscodec_setbits(PLAYCTL, 0, PLAYCTL_PDN_DSP);
- }
-}
-
-void audiohw_set_bass(int value)
-{
- bass = value;
- handle_dsp_power();
- if (value >= -105 && value <= 120)
- cscodec_setbits(TONECTL, TONECTL_BASS_MASK,
- (8 - value / 15) << TONECTL_BASS_SHIFT);
-}
-
-void audiohw_set_treble(int value)
-{
- treble = value;
- handle_dsp_power();
- if (value >= -105 && value <= 120)
- cscodec_setbits(TONECTL, TONECTL_TREB_MASK,
- (8 - value / 15) << TONECTL_TREB_SHIFT);
-}
-
-void audiohw_set_bass_cutoff(int value)
-{
- cscodec_setbits(BTCTL, BTCTL_BASSCF_MASK,
- (value - 1) << BTCTL_BASSCF_SHIFT);
-}
-
-void audiohw_set_treble_cutoff(int value)
-{
- cscodec_setbits(BTCTL, BTCTL_TREBCF_MASK,
- (value - 1) << BTCTL_TREBCF_SHIFT);
-}
-
-void audiohw_set_prescaler(int value)
-{
- cscodec_setbits(MSTAVOL, MSTAVOL_VOLUME_MASK,
- (-value / 5) << MSTAVOL_VOLUME_SHIFT);
- cscodec_setbits(MSTBVOL, MSTBVOL_VOLUME_MASK,
- (-value / 5) << MSTBVOL_VOLUME_SHIFT);
-}
-
-/* Nice shutdown of CS42L55 codec */
-void audiohw_close(void)
-{
- audiohw_mute(true);
- cscodec_write(HPACTL, HPACTL_HPAMUTE);
- cscodec_write(HPBCTL, HPBCTL_HPBMUTE);
- cscodec_write(LINEACTL, LINEACTL_LINEAMUTE);
- cscodec_write(LINEBCTL, LINEBCTL_LINEBMUTE);
- cscodec_write(PWRCTL1, PWRCTL1_PDN_CHRG | PWRCTL1_PDN_ADCA
- | PWRCTL1_PDN_ADCB | PWRCTL1_PDN_CODEC);
- cscodec_reset(true);
- cscodec_clock(false);
- cscodec_power(false);
-}
-
-/* Note: Disable output before calling this function */
-void audiohw_set_frequency(int fsel)
-{
- if (fsel == HW_FREQ_8) cscodec_write(CLKCTL2, CLKCTL2_8000HZ);
- else if (fsel == HW_FREQ_11) cscodec_write(CLKCTL2, CLKCTL2_11025HZ);
- else if (fsel == HW_FREQ_12) cscodec_write(CLKCTL2, CLKCTL2_12000HZ);
- else if (fsel == HW_FREQ_16) cscodec_write(CLKCTL2, CLKCTL2_16000HZ);
- else if (fsel == HW_FREQ_22) cscodec_write(CLKCTL2, CLKCTL2_22050HZ);
- else if (fsel == HW_FREQ_24) cscodec_write(CLKCTL2, CLKCTL2_24000HZ);
- else if (fsel == HW_FREQ_32) cscodec_write(CLKCTL2, CLKCTL2_32000HZ);
- else if (fsel == HW_FREQ_44) cscodec_write(CLKCTL2, CLKCTL2_44100HZ);
- else if (fsel == HW_FREQ_48) cscodec_write(CLKCTL2, CLKCTL2_48000HZ);
-}
-
-#ifdef HAVE_RECORDING
-//TODO: Implement
-#endif /* HAVE_RECORDING */
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: wm8975.c 28572 2010-11-13 11:38:38Z theseven $ + * + * Driver for Cirrus Logic CS42L55 audio codec + * + * Copyright (c) 2010 Michael Sparmann + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "logf.h" +#include "system.h" +#include "string.h" +#include "audio.h" +#include "sound.h" +#include "audiohw.h" +#include "cscodec.h" +#include "cs42l55.h" + +const struct sound_settings_info audiohw_settings[] = { + [SOUND_VOLUME] = {"dB", 0, 1, -60, 12, -25}, + [SOUND_BASS] = {"dB", 1, 15,-105, 120, 0}, + [SOUND_TREBLE] = {"dB", 1, 15,-105, 120, 0}, + [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, + [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, + [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, + [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 2}, + [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1}, +}; + +static int bass, treble; + +/* convert tenth of dB volume (-600..120) to master volume register value */ +int tenthdb2master(int db) +{ + /* -60dB to +12dB in 1dB steps */ + /* 0001100 == +12dB (0xc) */ + /* 0000000 == 0dB (0x0) */ + /* 1000100 == -60dB (0x44, this is actually -58dB) */ + + if (db < VOLUME_MIN) return HPACTL_HPAMUTE; + return (db / 10) & HPACTL_HPAVOL_MASK; +} + +static void cscodec_setbits(int reg, unsigned char off, unsigned char on) +{ + unsigned char data = (cscodec_read(reg) & ~off) | on; + cscodec_write(reg, data); +} + +static void audiohw_mute(bool mute) +{ + if (mute) cscodec_setbits(PLAYCTL, 0, PLAYCTL_MSTAMUTE | PLAYCTL_MSTBMUTE); + else cscodec_setbits(PLAYCTL, PLAYCTL_MSTAMUTE | PLAYCTL_MSTBMUTE, 0); +} + +void audiohw_preinit(void) +{ + cscodec_power(true); + cscodec_clock(true); + cscodec_reset(true); + sleep(HZ / 100); + cscodec_reset(false); + + bass = 0; + treble = 0; + + /* Ask Cirrus or maybe Apple what the hell this means */ + cscodec_write(HIDDENCTL, HIDDENCTL_UNLOCK); + cscodec_write(HIDDEN2E, HIDDEN2E_DEFAULT); + cscodec_write(HIDDEN32, HIDDEN32_DEFAULT); + cscodec_write(HIDDEN33, HIDDEN33_DEFAULT); + cscodec_write(HIDDEN34, HIDDEN34_DEFAULT); + cscodec_write(HIDDEN35, HIDDEN35_DEFAULT); + cscodec_write(HIDDEN36, HIDDEN36_DEFAULT); + cscodec_write(HIDDEN37, HIDDEN37_DEFAULT); + cscodec_write(HIDDEN3A, HIDDEN3A_DEFAULT); + cscodec_write(HIDDEN3C, HIDDEN3C_DEFAULT); + cscodec_write(HIDDEN3D, HIDDEN3D_DEFAULT); + cscodec_write(HIDDEN3E, HIDDEN3E_DEFAULT); + cscodec_write(HIDDEN3F, HIDDEN3F_DEFAULT); + cscodec_write(HIDDENCTL, HIDDENCTL_LOCK); + + cscodec_write(PWRCTL2, PWRCTL2_PDN_LINA_ALWAYS | PWRCTL2_PDN_LINB_ALWAYS + | PWRCTL2_PDN_HPA_NEVER | PWRCTL2_PDN_HPB_NEVER); + cscodec_write(CLKCTL1, CLKCTL1_MASTER | CLKCTL1_SCLKMCLK_BEFORE + | CLKCTL1_MCLKDIV2); + cscodec_write(CLKCTL2, CLKCTL2_44100HZ); + cscodec_write(MISCCTL, MISCCTL_UNDOC4 | MISCCTL_ANLGZC | MISCCTL_DIGSFT); + cscodec_write(PWRCTL1, PWRCTL1_PDN_CHRG | PWRCTL1_PDN_ADCA + | PWRCTL1_PDN_ADCB | PWRCTL1_PDN_CODEC); + cscodec_write(PLAYCTL, PLAYCTL_PDN_DSP + | PLAYCTL_MSTAMUTE | PLAYCTL_MSTBMUTE); + cscodec_write(PGAACTL, 0); + cscodec_write(PGABCTL, 0); + cscodec_write(HPACTL, HPACTL_HPAMUTE); + cscodec_write(HPBCTL, HPBCTL_HPBMUTE); + cscodec_write(LINEACTL, LINEACTL_LINEAMUTE); + cscodec_write(LINEBCTL, LINEBCTL_LINEBMUTE); + cscodec_write(PWRCTL1, PWRCTL1_PDN_CHRG | PWRCTL1_PDN_ADCA + | PWRCTL1_PDN_ADCB); +} + +void audiohw_postinit(void) +{ + cscodec_write(HPACTL, 0); + cscodec_write(HPBCTL, 0); + cscodec_write(LINEACTL, 0); + cscodec_write(LINEBCTL, 0); + cscodec_write(CLSHCTL, CLSHCTL_ADPTPWR_SIGNAL); + audiohw_mute(false); +} + +void audiohw_set_master_vol(int vol_l, int vol_r) +{ + /* -60dB to +12dB in 1dB steps */ + /* 0001100 == +12dB (0xc) */ + /* 0000000 == 0dB (0x0) */ + /* 1000100 == -60dB (0x44, this is actually -58dB) */ + + cscodec_setbits(HPACTL, HPACTL_HPAVOL_MASK | HPACTL_HPAMUTE, + vol_l << HPACTL_HPAVOL_SHIFT); + cscodec_setbits(HPBCTL, HPBCTL_HPBVOL_MASK | HPBCTL_HPBMUTE, + vol_r << HPBCTL_HPBVOL_SHIFT); +} + +void audiohw_set_lineout_vol(int vol_l, int vol_r) +{ + /* -60dB to +12dB in 1dB steps */ + /* 0001100 == +12dB (0xc) */ + /* 0000000 == 0dB (0x0) */ + /* 1000100 == -60dB (0x44, this is actually -58dB) */ + + cscodec_setbits(LINEACTL, LINEACTL_LINEAVOL_MASK | LINEACTL_LINEAMUTE, + vol_l << LINEACTL_LINEAVOL_SHIFT); + cscodec_setbits(LINEBCTL, LINEBCTL_LINEBVOL_MASK | LINEBCTL_LINEBMUTE, + vol_r << LINEBCTL_LINEBVOL_SHIFT); +} + +void audiohw_enable_lineout(bool enable) +{ + if (enable) + cscodec_setbits(PWRCTL2, PWRCTL2_PDN_LINA_MASK | PWRCTL2_PDN_LINB_MASK, + PWRCTL2_PDN_LINA_NEVER | PWRCTL2_PDN_LINB_NEVER); + else + cscodec_setbits(PWRCTL2, PWRCTL2_PDN_LINA_MASK | PWRCTL2_PDN_LINB_MASK, + PWRCTL2_PDN_LINA_ALWAYS | PWRCTL2_PDN_LINB_ALWAYS); +} + +static void handle_dsp_power(void) +{ + if (bass || treble) + { + cscodec_setbits(PLAYCTL, PLAYCTL_PDN_DSP, 0); + cscodec_setbits(BTCTL, 0, BTCTL_TCEN); + } + else + { + cscodec_setbits(BTCTL, BTCTL_TCEN, 0); + cscodec_setbits(PLAYCTL, 0, PLAYCTL_PDN_DSP); + } +} + +void audiohw_set_bass(int value) +{ + bass = value; + handle_dsp_power(); + if (value >= -105 && value <= 120) + cscodec_setbits(TONECTL, TONECTL_BASS_MASK, + (8 - value / 15) << TONECTL_BASS_SHIFT); +} + +void audiohw_set_treble(int value) +{ + treble = value; + handle_dsp_power(); + if (value >= -105 && value <= 120) + cscodec_setbits(TONECTL, TONECTL_TREB_MASK, + (8 - value / 15) << TONECTL_TREB_SHIFT); +} + +void audiohw_set_bass_cutoff(int value) +{ + cscodec_setbits(BTCTL, BTCTL_BASSCF_MASK, + (value - 1) << BTCTL_BASSCF_SHIFT); +} + +void audiohw_set_treble_cutoff(int value) +{ + cscodec_setbits(BTCTL, BTCTL_TREBCF_MASK, + (value - 1) << BTCTL_TREBCF_SHIFT); +} + +void audiohw_set_prescaler(int value) +{ + cscodec_setbits(MSTAVOL, MSTAVOL_VOLUME_MASK, + (-value / 5) << MSTAVOL_VOLUME_SHIFT); + cscodec_setbits(MSTBVOL, MSTBVOL_VOLUME_MASK, + (-value / 5) << MSTBVOL_VOLUME_SHIFT); +} + +/* Nice shutdown of CS42L55 codec */ +void audiohw_close(void) +{ + audiohw_mute(true); + cscodec_write(HPACTL, HPACTL_HPAMUTE); + cscodec_write(HPBCTL, HPBCTL_HPBMUTE); + cscodec_write(LINEACTL, LINEACTL_LINEAMUTE); + cscodec_write(LINEBCTL, LINEBCTL_LINEBMUTE); + cscodec_write(PWRCTL1, PWRCTL1_PDN_CHRG | PWRCTL1_PDN_ADCA + | PWRCTL1_PDN_ADCB | PWRCTL1_PDN_CODEC); + cscodec_reset(true); + cscodec_clock(false); + cscodec_power(false); +} + +/* Note: Disable output before calling this function */ +void audiohw_set_frequency(int fsel) +{ + if (fsel == HW_FREQ_8) cscodec_write(CLKCTL2, CLKCTL2_8000HZ); + else if (fsel == HW_FREQ_11) cscodec_write(CLKCTL2, CLKCTL2_11025HZ); + else if (fsel == HW_FREQ_12) cscodec_write(CLKCTL2, CLKCTL2_12000HZ); + else if (fsel == HW_FREQ_16) cscodec_write(CLKCTL2, CLKCTL2_16000HZ); + else if (fsel == HW_FREQ_22) cscodec_write(CLKCTL2, CLKCTL2_22050HZ); + else if (fsel == HW_FREQ_24) cscodec_write(CLKCTL2, CLKCTL2_24000HZ); + else if (fsel == HW_FREQ_32) cscodec_write(CLKCTL2, CLKCTL2_32000HZ); + else if (fsel == HW_FREQ_44) cscodec_write(CLKCTL2, CLKCTL2_44100HZ); + else if (fsel == HW_FREQ_48) cscodec_write(CLKCTL2, CLKCTL2_48000HZ); +} + +#ifdef HAVE_RECORDING +//TODO: Implement +#endif /* HAVE_RECORDING */ diff --git a/firmware/drivers/audio/dac3550a.c b/firmware/drivers/audio/dac3550a.c index e13602e..9c6dfbb 100644 --- a/firmware/drivers/audio/dac3550a.c +++ b/firmware/drivers/audio/dac3550a.c @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: dac.c 17847 2008-06-28 18:10:04Z bagder $ + * $Id$ * * Copyright (C) 2002 by Linus Nielsen Feltzing * diff --git a/firmware/export/ata-defines.h b/firmware/export/ata-defines.h index 1650c9f..70249ed 100644 --- a/firmware/export/ata-defines.h +++ b/firmware/export/ata-defines.h @@ -1,58 +1,58 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: ata.h 28951 2011-01-02 23:02:55Z theseven $
- *
- * Copyright (C) 2011 by Michael Sparmann
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef __ATA_DEFINES_H__
-#define __ATA_DEFINES_H__
-
-#ifndef ATA_OUT8
-#define ATA_OUT8(reg, data) (reg) = (data)
-#endif
-#ifndef ATA_OUT16
-#define ATA_OUT16(reg, data) (reg) = (data)
-#endif
-#ifndef ATA_IN8
-#define ATA_IN8(reg) (reg)
-#endif
-#ifndef ATA_IN16
-#define ATA_IN16(reg) (reg)
-#endif
-#ifndef ATA_SWAP_IDENTIFY
-#define ATA_SWAP_IDENTIFY(word) (word)
-#endif
-
-#define STATUS_BSY 0x80
-#define STATUS_RDY 0x40
-#define STATUS_DRQ 0x08
-#define STATUS_ERR 0x01
-#define STATUS_DF 0x20
-#define ERROR_IDNF 0x10
-#define ERROR_ABRT 0x04
-
-#define TEST_PATTERN1 0xa5
-#define TEST_PATTERN2 0x5a
-#define TEST_PATTERN3 0xaa
-#define TEST_PATTERN4 0x55
-
-#define ATA_FEATURE ATA_ERROR
-
-#define ATA_STATUS ATA_COMMAND
-#define ATA_ALT_STATUS ATA_CONTROL
-
-#endif
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: ata.h 28951 2011-01-02 23:02:55Z theseven $ + * + * Copyright (C) 2011 by Michael Sparmann + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef __ATA_DEFINES_H__ +#define __ATA_DEFINES_H__ + +#ifndef ATA_OUT8 +#define ATA_OUT8(reg, data) (reg) = (data) +#endif +#ifndef ATA_OUT16 +#define ATA_OUT16(reg, data) (reg) = (data) +#endif +#ifndef ATA_IN8 +#define ATA_IN8(reg) (reg) +#endif +#ifndef ATA_IN16 +#define ATA_IN16(reg) (reg) +#endif +#ifndef ATA_SWAP_IDENTIFY +#define ATA_SWAP_IDENTIFY(word) (word) +#endif + +#define STATUS_BSY 0x80 +#define STATUS_RDY 0x40 +#define STATUS_DRQ 0x08 +#define STATUS_ERR 0x01 +#define STATUS_DF 0x20 +#define ERROR_IDNF 0x10 +#define ERROR_ABRT 0x04 + +#define TEST_PATTERN1 0xa5 +#define TEST_PATTERN2 0x5a +#define TEST_PATTERN3 0xaa +#define TEST_PATTERN4 0x55 + +#define ATA_FEATURE ATA_ERROR + +#define ATA_STATUS ATA_COMMAND +#define ATA_ALT_STATUS ATA_CONTROL + +#endif diff --git a/firmware/export/config/rk27generic.h b/firmware/export/config/rk27generic.h index b2c74bd..d7b63f0 100644 --- a/firmware/export/config/rk27generic.h +++ b/firmware/export/config/rk27generic.h @@ -1,189 +1,189 @@ -/*
- * This config file is for Rockchip rk27xx reference design
- */
-#define TARGET_TREE /* this target is using the target tree system */
-
-/* For Rolo and boot loader */
-#define MODEL_NUMBER 78
-
-#define MODEL_NAME "Rockchip 27xx generic"
-
-/* define this if you have recording possibility */
-/* #define HAVE_RECORDING */
-
-/* Define bitmask of input sources - recordable bitmask can be defined
- explicitly if different */
-/* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FM) */
-
-/* define the bitmask of hardware sample rates */
-#define HW_SAMPR_CAPS (SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11 \
- | SAMPR_CAP_48 | SAMPR_CAP_24 | SAMPR_CAP_12 \
- | SAMPR_CAP_32 | SAMPR_CAP_16 | SAMPR_CAP_8)
-
-/* define the bitmask of recording sample rates */
-#define REC_SAMPR_CAPS (SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11 \
- | SAMPR_CAP_48 | SAMPR_CAP_24 | SAMPR_CAP_12 \
- | SAMPR_CAP_32 | SAMPR_CAP_16 | SAMPR_CAP_8)
-
-/* define this if you have a bitmap LCD display */
-#define HAVE_LCD_BITMAP
-
-/* define this if you can flip your LCD */
-/* #define HAVE_LCD_FLIP */
-
-/* define this if you have a colour LCD */
-#define HAVE_LCD_COLOR
-
-/* define this if you want album art for this target */
-#define HAVE_ALBUMART
-
-/* define this to enable bitmap scaling */
-#define HAVE_BMP_SCALING
-
-/* define this to enable JPEG decoding */
-#define HAVE_JPEG
-
-/* define this if you can invert the colours on your LCD */
-/* #define HAVE_LCD_INVERT */
-
-/* define this if you have access to the quickscreen */
-#define HAVE_QUICKSCREEN
-
-/* define this if you have access to the pitchscreen */
-#define HAVE_PITCHSCREEN
-
-/* define this if you would like tagcache to build on this target */
-#define HAVE_TAGCACHE
-
-/* define this if you have a flash memory storage */
-#define HAVE_FLASH_STORAGE
-
-#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
-
-#define CONFIG_NAND NAND_RK27XX
-#define HAVE_SW_TONE_CONTROLS
-
-/* commented for now */
-/* #define HAVE_HOTSWAP */
-
-#define NUM_DRIVES 2
-#define SECTOR_SIZE 512
-
-/* for small(ish) SD cards */
-#define HAVE_FAT16SUPPORT
-
-/* LCD dimensions */
-#define LCD_WIDTH 400
-#define LCD_HEIGHT 240
-#define LCD_DEPTH 16 /* pseudo 262.144 colors */
-#define LCD_PIXELFORMAT RGB565 /* rgb565 */
-
-/* Define this if the LCD can shut down */
-/* #define HAVE_LCD_SHUTDOWN */
-
-/* Define this if your LCD can be enabled/disabled */
-/* #define HAVE_LCD_ENABLE */
-
-/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
- should be defined as well. */
-#ifndef BOOTLOADER
-/* TODO: #define HAVE_LCD_SLEEP */
-/* TODO: #define HAVE_LCD_SLEEP_SETTING */
-#endif
-
-#define CONFIG_KEYPAD RK27XX_GENERIC_PAD
-
-/* Define this to enable morse code input */
-#define HAVE_MORSE_INPUT
-
-/* Define this if you do software codec */
-#define CONFIG_CODEC SWCODEC
-
-/* define this if you have a real-time clock */
-/* #define CONFIG_RTC RTC_NANO2G */
-
-/* Define if the device can wake from an RTC alarm */
-/* #define HAVE_RTC_ALARM */
-
-#define CONFIG_LCD LCD_SPFD5420A
-
-/* Define the type of audio codec */
-#define HAVE_RK27XX_CODEC
-
-/* #define HAVE_PCM_DMA_ADDRESS */
-
-/* Define this for LCD backlight available */
-#define HAVE_BACKLIGHT
-#define HAVE_BACKLIGHT_BRIGHTNESS
-#define MIN_BRIGHTNESS_SETTING 0
-#define MAX_BRIGHTNESS_SETTING 31
-#define DEFAULT_BRIGHTNESS_SETTING 20
-#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG
-
-/* Define this if you have a software controlled poweroff */
-#define HAVE_SW_POWEROFF
-
-/* The number of bytes reserved for loadable codecs */
-#define CODEC_SIZE 0x100000
-
-/* The number of bytes reserved for loadable plugins */
-#define PLUGIN_BUFFER_SIZE 0x80000
-
-/* TODO: Figure out real values */
-#define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity */
-#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
-#define BATTERY_CAPACITY_MAX 500 /* max. capacity selectable */
-#define BATTERY_CAPACITY_INC 10 /* capacity increment */
-#define BATTERY_TYPES_COUNT 1 /* only one type */
-
-/* Hardware controlled charging with monitoring */
-#define CONFIG_CHARGING CHARGING_MONITOR
-
-/* define current usage levels */
-/* TODO: #define CURRENT_NORMAL
- * TODO: #define CURRENT_BACKLIGHT 23
- */
-
-/* define this if the unit can be powered or charged via USB */
-#define HAVE_USB_POWER
-
-/* USB On-the-go */
-#define CONFIG_USBOTG USBOTG_RK27XX
-
-/* enable these for the experimental usb stack */
-#define HAVE_USBSTACK
-
-#define USE_ROCKBOX_USB
-#define USB_VENDOR_ID 0x071b
-#define USB_PRODUCT_ID 0x3202
-#define HAVE_BOOTLOADER_USB_MODE
-
-/* Define this if your LCD can set contrast */
-/* #define HAVE_LCD_CONTRAST */
-
-/* The exact type of CPU */
-#define CONFIG_CPU RK27XX
-
-/* I2C interface */
-#define CONFIG_I2C I2C_RK27XX
-
-/* Define this to the CPU frequency */
-#define CPU_FREQ 200000000
-
-/* define this if the hardware can be powered off while charging */
-/* #define HAVE_POWEROFF_WHILE_CHARGING */
-
-/* Offset ( in the firmware file's header ) to the file CRC */
-#define FIRMWARE_OFFSET_FILE_CRC 0
-
-/* Offset ( in the firmware file's header ) to the real data */
-#define FIRMWARE_OFFSET_FILE_DATA 8
-
-#define STORAGE_NEEDS_ALIGN
-
-/* Define this if you have adjustable CPU frequency */
-/* #define HAVE_ADJUSTABLE_CPU_FREQ */
-
-#define BOOTFILE_EXT "rk27"
-#define BOOTFILE "rockbox." BOOTFILE_EXT
-#define BOOTDIR "/.rockbox"
+/* + * This config file is for Rockchip rk27xx reference design + */ +#define TARGET_TREE /* this target is using the target tree system */ + +/* For Rolo and boot loader */ +#define MODEL_NUMBER 78 + +#define MODEL_NAME "Rockchip 27xx generic" + +/* define this if you have recording possibility */ +/* #define HAVE_RECORDING */ + +/* Define bitmask of input sources - recordable bitmask can be defined + explicitly if different */ +/* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FM) */ + +/* define the bitmask of hardware sample rates */ +#define HW_SAMPR_CAPS (SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11 \ + | SAMPR_CAP_48 | SAMPR_CAP_24 | SAMPR_CAP_12 \ + | SAMPR_CAP_32 | SAMPR_CAP_16 | SAMPR_CAP_8) + +/* define the bitmask of recording sample rates */ +#define REC_SAMPR_CAPS (SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11 \ + | SAMPR_CAP_48 | SAMPR_CAP_24 | SAMPR_CAP_12 \ + | SAMPR_CAP_32 | SAMPR_CAP_16 | SAMPR_CAP_8) + +/* define this if you have a bitmap LCD display */ +#define HAVE_LCD_BITMAP + +/* define this if you can flip your LCD */ +/* #define HAVE_LCD_FLIP */ + +/* define this if you have a colour LCD */ +#define HAVE_LCD_COLOR + +/* define this if you want album art for this target */ +#define HAVE_ALBUMART + +/* define this to enable bitmap scaling */ +#define HAVE_BMP_SCALING + +/* define this to enable JPEG decoding */ +#define HAVE_JPEG + +/* define this if you can invert the colours on your LCD */ +/* #define HAVE_LCD_INVERT */ + +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + +/* define this if you have access to the pitchscreen */ +#define HAVE_PITCHSCREEN + +/* define this if you would like tagcache to build on this target */ +#define HAVE_TAGCACHE + +/* define this if you have a flash memory storage */ +#define HAVE_FLASH_STORAGE + +#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND) + +#define CONFIG_NAND NAND_RK27XX +#define HAVE_SW_TONE_CONTROLS + +/* commented for now */ +/* #define HAVE_HOTSWAP */ + +#define NUM_DRIVES 2 +#define SECTOR_SIZE 512 + +/* for small(ish) SD cards */ +#define HAVE_FAT16SUPPORT + +/* LCD dimensions */ +#define LCD_WIDTH 400 +#define LCD_HEIGHT 240 +#define LCD_DEPTH 16 /* pseudo 262.144 colors */ +#define LCD_PIXELFORMAT RGB565 /* rgb565 */ + +/* Define this if the LCD can shut down */ +/* #define HAVE_LCD_SHUTDOWN */ + +/* Define this if your LCD can be enabled/disabled */ +/* #define HAVE_LCD_ENABLE */ + +/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE + should be defined as well. */ +#ifndef BOOTLOADER +/* TODO: #define HAVE_LCD_SLEEP */ +/* TODO: #define HAVE_LCD_SLEEP_SETTING */ +#endif + +#define CONFIG_KEYPAD RK27XX_GENERIC_PAD + +/* Define this to enable morse code input */ +#define HAVE_MORSE_INPUT + +/* Define this if you do software codec */ +#define CONFIG_CODEC SWCODEC + +/* define this if you have a real-time clock */ +/* #define CONFIG_RTC RTC_NANO2G */ + +/* Define if the device can wake from an RTC alarm */ +/* #define HAVE_RTC_ALARM */ + +#define CONFIG_LCD LCD_SPFD5420A + +/* Define the type of audio codec */ +#define HAVE_RK27XX_CODEC + +/* #define HAVE_PCM_DMA_ADDRESS */ + +/* Define this for LCD backlight available */ +#define HAVE_BACKLIGHT +#define HAVE_BACKLIGHT_BRIGHTNESS +#define MIN_BRIGHTNESS_SETTING 0 +#define MAX_BRIGHTNESS_SETTING 31 +#define DEFAULT_BRIGHTNESS_SETTING 20 +#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_HW_REG + +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + +/* The number of bytes reserved for loadable codecs */ +#define CODEC_SIZE 0x100000 + +/* The number of bytes reserved for loadable plugins */ +#define PLUGIN_BUFFER_SIZE 0x80000 + +/* TODO: Figure out real values */ +#define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity */ +#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MAX 500 /* max. capacity selectable */ +#define BATTERY_CAPACITY_INC 10 /* capacity increment */ +#define BATTERY_TYPES_COUNT 1 /* only one type */ + +/* Hardware controlled charging with monitoring */ +#define CONFIG_CHARGING CHARGING_MONITOR + +/* define current usage levels */ +/* TODO: #define CURRENT_NORMAL + * TODO: #define CURRENT_BACKLIGHT 23 + */ + +/* define this if the unit can be powered or charged via USB */ +#define HAVE_USB_POWER + +/* USB On-the-go */ +#define CONFIG_USBOTG USBOTG_RK27XX + +/* enable these for the experimental usb stack */ +#define HAVE_USBSTACK + +#define USE_ROCKBOX_USB +#define USB_VENDOR_ID 0x071b +#define USB_PRODUCT_ID 0x3202 +#define HAVE_BOOTLOADER_USB_MODE + +/* Define this if your LCD can set contrast */ +/* #define HAVE_LCD_CONTRAST */ + +/* The exact type of CPU */ +#define CONFIG_CPU RK27XX + +/* I2C interface */ +#define CONFIG_I2C I2C_RK27XX + +/* Define this to the CPU frequency */ +#define CPU_FREQ 200000000 + +/* define this if the hardware can be powered off while charging */ +/* #define HAVE_POWEROFF_WHILE_CHARGING */ + +/* Offset ( in the firmware file's header ) to the file CRC */ +#define FIRMWARE_OFFSET_FILE_CRC 0 + +/* Offset ( in the firmware file's header ) to the real data */ +#define FIRMWARE_OFFSET_FILE_DATA 8 + +#define STORAGE_NEEDS_ALIGN + +/* Define this if you have adjustable CPU frequency */ +/* #define HAVE_ADJUSTABLE_CPU_FREQ */ + +#define BOOTFILE_EXT "rk27" +#define BOOTFILE "rockbox." BOOTFILE_EXT +#define BOOTDIR "/.rockbox" diff --git a/firmware/export/dac3550a.h b/firmware/export/dac3550a.h index 3744b22..23c4db9 100644 --- a/firmware/export/dac3550a.h +++ b/firmware/export/dac3550a.h @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: dac.h 24158 2010-01-03 11:31:14Z Buschel $ + * $Id$ * * Copyright (C) 2002 by Linus Nielsen Feltzing * diff --git a/firmware/export/mascodec.h b/firmware/export/mascodec.h index 82a71e3..f10dc3f 100644 --- a/firmware/export/mascodec.h +++ b/firmware/export/mascodec.h @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: mas.h 24154 2010-01-03 10:27:43Z Buschel $ + * $Id$ * * Copyright (C) 2002 by Linus Nielsen Feltzing * diff --git a/firmware/export/s5l8702.h b/firmware/export/s5l8702.h index 338d7a5..31e6a63 100644 --- a/firmware/export/s5l8702.h +++ b/firmware/export/s5l8702.h @@ -1,830 +1,830 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: s5l8700.h 28791 2010-12-11 09:39:33Z Buschel $
- *
- * Copyright (C) 2008 by Marcoen Hirschberg, Bart van Adrichem
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#ifndef __S5L8702_H__
-#define __S5L8702_H__
-
-#include <inttypes.h>
-
-#define REG8_PTR_T volatile uint8_t *
-#define REG16_PTR_T volatile uint16_t *
-#define REG32_PTR_T volatile uint32_t *
-
-#define TIMER_FREQ 54000000
-
-#define CACHEALIGN_BITS (4) /* 2^4 = 16 bytes */
-
-#define DRAM_ORIG 0x08000000
-#define IRAM_ORIG 0
-
-#define DRAM_SIZE (MEMORYSIZE * 0x100000)
-#define IRAM_SIZE 0x40000
-
-#define TTB_SIZE 0x4000
-#define TTB_BASE_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE)
-
-/////SYSTEM CONTROLLER/////
-#define CLKCON0 (*((volatile uint32_t*)(0x3C500000)))
-#define CLKCON1 (*((volatile uint32_t*)(0x3C500004)))
-#define CLKCON2 (*((volatile uint32_t*)(0x3C500008)))
-#define CLKCON3 (*((volatile uint32_t*)(0x3C50000C)))
-#define CLKCON4 (*((volatile uint32_t*)(0x3C500010)))
-#define CLKCON5 (*((volatile uint32_t*)(0x3C500014)))
-#define PLL0PMS (*((volatile uint32_t*)(0x3C500020)))
-#define PLL1PMS (*((volatile uint32_t*)(0x3C500024)))
-#define PLL2PMS (*((volatile uint32_t*)(0x3C500028)))
-#define PLL0LCNT (*((volatile uint32_t*)(0x3C500030)))
-#define PLL1LCNT (*((volatile uint32_t*)(0x3C500034)))
-#define PLL2LCNT (*((volatile uint32_t*)(0x3C500038)))
-#define PLLLOCK (*((volatile uint32_t*)(0x3C500040)))
-#define PLLMODE (*((volatile uint32_t*)(0x3C500044)))
-#define PWRCON(i) (*((uint32_t volatile*)(0x3C500000 \
- + ((i) == 4 ? 0x6C : \
- ((i) == 3 ? 0x68 : \
- ((i) == 2 ? 0x58 : \
- ((i) == 1 ? 0x4C : \
- 0x48)))))))
-
-
-/////TIMER/////
-#define TACON (*((uint32_t volatile*)(0x3C700000)))
-#define TACMD (*((uint32_t volatile*)(0x3C700004)))
-#define TADATA0 (*((uint32_t volatile*)(0x3C700008)))
-#define TADATA1 (*((uint32_t volatile*)(0x3C70000C)))
-#define TAPRE (*((uint32_t volatile*)(0x3C700010)))
-#define TACNT (*((uint32_t volatile*)(0x3C700014)))
-#define TBCON (*((uint32_t volatile*)(0x3C700020)))
-#define TBCMD (*((uint32_t volatile*)(0x3C700024)))
-#define TBDATA0 (*((uint32_t volatile*)(0x3C700028)))
-#define TBDATA1 (*((uint32_t volatile*)(0x3C70002C)))
-#define TBPRE (*((uint32_t volatile*)(0x3C700030)))
-#define TBCNT (*((uint32_t volatile*)(0x3C700034)))
-#define TCCON (*((uint32_t volatile*)(0x3C700040)))
-#define TCCMD (*((uint32_t volatile*)(0x3C700044)))
-#define TCDATA0 (*((uint32_t volatile*)(0x3C700048)))
-#define TCDATA1 (*((uint32_t volatile*)(0x3C70004C)))
-#define TCPRE (*((uint32_t volatile*)(0x3C700050)))
-#define TCCNT (*((uint32_t volatile*)(0x3C700054)))
-#define TDCON (*((uint32_t volatile*)(0x3C700060)))
-#define TDCMD (*((uint32_t volatile*)(0x3C700064)))
-#define TDDATA0 (*((uint32_t volatile*)(0x3C700068)))
-#define TDDATA1 (*((uint32_t volatile*)(0x3C70006C)))
-#define TDPRE (*((uint32_t volatile*)(0x3C700070)))
-#define TDCNT (*((uint32_t volatile*)(0x3C700074)))
-#define TECON (*((uint32_t volatile*)(0x3C7000A0)))
-#define TECMD (*((uint32_t volatile*)(0x3C7000A4)))
-#define TEDATA0 (*((uint32_t volatile*)(0x3C7000A8)))
-#define TEDATA1 (*((uint32_t volatile*)(0x3C7000AC)))
-#define TEPRE (*((uint32_t volatile*)(0x3C7000B0)))
-#define TECNT (*((uint32_t volatile*)(0x3C7000B4)))
-#define TFCON (*((uint32_t volatile*)(0x3C7000C0)))
-#define TFCMD (*((uint32_t volatile*)(0x3C7000C4)))
-#define TFDATA0 (*((uint32_t volatile*)(0x3C7000C8)))
-#define TFDATA1 (*((uint32_t volatile*)(0x3C7000CC)))
-#define TFPRE (*((uint32_t volatile*)(0x3C7000D0)))
-#define TFCNT (*((uint32_t volatile*)(0x3C7000D4)))
-#define TGCON (*((uint32_t volatile*)(0x3C7000E0)))
-#define TGCMD (*((uint32_t volatile*)(0x3C7000E4)))
-#define TGDATA0 (*((uint32_t volatile*)(0x3C7000E8)))
-#define TGDATA1 (*((uint32_t volatile*)(0x3C7000EC)))
-#define TGPRE (*((uint32_t volatile*)(0x3C7000F0)))
-#define TGCNT (*((uint32_t volatile*)(0x3C7000F4)))
-#define THCON (*((uint32_t volatile*)(0x3C700100)))
-#define THCMD (*((uint32_t volatile*)(0x3C700104)))
-#define THDATA0 (*((uint32_t volatile*)(0x3C700108)))
-#define THDATA1 (*((uint32_t volatile*)(0x3C70010C)))
-#define THPRE (*((uint32_t volatile*)(0x3C700110)))
-#define THCNT (*((uint32_t volatile*)(0x3C700114)))
-#define USEC_TIMER TECNT
-
-
-/////USB/////
-#define OTGBASE 0x38400000
-#define PHYBASE 0x3C400000
-#define SYNOPSYSOTG_CLOCK 0
-#define SYNOPSYSOTG_AHBCFG 0x2B
-
-
-/////I2C/////
-#define IICCON(bus) (*((uint32_t volatile*)(0x3C600000 + 0x300000 * (bus))))
-#define IICSTAT(bus) (*((uint32_t volatile*)(0x3C600004 + 0x300000 * (bus))))
-#define IICADD(bus) (*((uint32_t volatile*)(0x3C600008 + 0x300000 * (bus))))
-#define IICDS(bus) (*((uint32_t volatile*)(0x3C60000C + 0x300000 * (bus))))
-
-
-/////INTERRUPT CONTROLLERS/////
-#define VICIRQSTATUS(v) (*((uint32_t volatile*)(0x38E00000 + 0x1000 * (v))))
-#define VICFIQSTATUS(v) (*((uint32_t volatile*)(0x38E00004 + 0x1000 * (v))))
-#define VICRAWINTR(v) (*((uint32_t volatile*)(0x38E00008 + 0x1000 * (v))))
-#define VICINTSELECT(v) (*((uint32_t volatile*)(0x38E0000C + 0x1000 * (v))))
-#define VICINTENABLE(v) (*((uint32_t volatile*)(0x38E00010 + 0x1000 * (v))))
-#define VICINTENCLEAR(v) (*((uint32_t volatile*)(0x38E00014 + 0x1000 * (v))))
-#define VICSOFTINT(v) (*((uint32_t volatile*)(0x38E00018 + 0x1000 * (v))))
-#define VICSOFTINTCLEAR(v) (*((uint32_t volatile*)(0x38E0001C + 0x1000 * (v))))
-#define VICPROTECTION(v) (*((uint32_t volatile*)(0x38E00020 + 0x1000 * (v))))
-#define VICSWPRIORITYMASK(v) (*((uint32_t volatile*)(0x38E00024 + 0x1000 * (v))))
-#define VICPRIORITYDAISY(v) (*((uint32_t volatile*)(0x38E00028 + 0x1000 * (v))))
-#define VICVECTADDR(v, i) (*((uint32_t volatile*)(0x38E00100 + 0x1000 * (v) + 4 * (i))))
-#define VICVECTPRIORITY(v, i) (*((uint32_t volatile*)(0x38E00200 + 0x1000 * (v) + 4 * (i))))
-#define VICADDRESS(v) (*((const void* volatile*)(0x38E00F00 + 0x1000 * (v))))
-#define VIC0IRQSTATUS (*((uint32_t volatile*)(0x38E00000)))
-#define VIC0FIQSTATUS (*((uint32_t volatile*)(0x38E00004)))
-#define VIC0RAWINTR (*((uint32_t volatile*)(0x38E00008)))
-#define VIC0INTSELECT (*((uint32_t volatile*)(0x38E0000C)))
-#define VIC0INTENABLE (*((uint32_t volatile*)(0x38E00010)))
-#define VIC0INTENCLEAR (*((uint32_t volatile*)(0x38E00014)))
-#define VIC0SOFTINT (*((uint32_t volatile*)(0x38E00018)))
-#define VIC0SOFTINTCLEAR (*((uint32_t volatile*)(0x38E0001C)))
-#define VIC0PROTECTION (*((uint32_t volatile*)(0x38E00020)))
-#define VIC0SWPRIORITYMASK (*((uint32_t volatile*)(0x38E00024)))
-#define VIC0PRIORITYDAISY (*((uint32_t volatile*)(0x38E00028)))
-#define VIC0VECTADDR(i) (*((const void* volatile*)(0x38E00100 + 4 * (i))))
-#define VIC0VECTADDR0 (*((const void* volatile*)(0x38E00100)))
-#define VIC0VECTADDR1 (*((const void* volatile*)(0x38E00104)))
-#define VIC0VECTADDR2 (*((const void* volatile*)(0x38E00108)))
-#define VIC0VECTADDR3 (*((const void* volatile*)(0x38E0010C)))
-#define VIC0VECTADDR4 (*((const void* volatile*)(0x38E00110)))
-#define VIC0VECTADDR5 (*((const void* volatile*)(0x38E00114)))
-#define VIC0VECTADDR6 (*((const void* volatile*)(0x38E00118)))
-#define VIC0VECTADDR7 (*((const void* volatile*)(0x38E0011C)))
-#define VIC0VECTADDR8 (*((const void* volatile*)(0x38E00120)))
-#define VIC0VECTADDR9 (*((const void* volatile*)(0x38E00124)))
-#define VIC0VECTADDR10 (*((const void* volatile*)(0x38E00128)))
-#define VIC0VECTADDR11 (*((const void* volatile*)(0x38E0012C)))
-#define VIC0VECTADDR12 (*((const void* volatile*)(0x38E00130)))
-#define VIC0VECTADDR13 (*((const void* volatile*)(0x38E00134)))
-#define VIC0VECTADDR14 (*((const void* volatile*)(0x38E00138)))
-#define VIC0VECTADDR15 (*((const void* volatile*)(0x38E0013C)))
-#define VIC0VECTADDR16 (*((const void* volatile*)(0x38E00140)))
-#define VIC0VECTADDR17 (*((const void* volatile*)(0x38E00144)))
-#define VIC0VECTADDR18 (*((const void* volatile*)(0x38E00148)))
-#define VIC0VECTADDR19 (*((const void* volatile*)(0x38E0014C)))
-#define VIC0VECTADDR20 (*((const void* volatile*)(0x38E00150)))
-#define VIC0VECTADDR21 (*((const void* volatile*)(0x38E00154)))
-#define VIC0VECTADDR22 (*((const void* volatile*)(0x38E00158)))
-#define VIC0VECTADDR23 (*((const void* volatile*)(0x38E0015C)))
-#define VIC0VECTADDR24 (*((const void* volatile*)(0x38E00160)))
-#define VIC0VECTADDR25 (*((const void* volatile*)(0x38E00164)))
-#define VIC0VECTADDR26 (*((const void* volatile*)(0x38E00168)))
-#define VIC0VECTADDR27 (*((const void* volatile*)(0x38E0016C)))
-#define VIC0VECTADDR28 (*((const void* volatile*)(0x38E00170)))
-#define VIC0VECTADDR29 (*((const void* volatile*)(0x38E00174)))
-#define VIC0VECTADDR30 (*((const void* volatile*)(0x38E00178)))
-#define VIC0VECTADDR31 (*((const void* volatile*)(0x38E0017C)))
-#define VIC0VECTPRIORITY(i) (*((uint32_t volatile*)(0x38E00200 + 4 * (i))))
-#define VIC0VECTPRIORITY0 (*((uint32_t volatile*)(0x38E00200)))
-#define VIC0VECTPRIORITY1 (*((uint32_t volatile*)(0x38E00204)))
-#define VIC0VECTPRIORITY2 (*((uint32_t volatile*)(0x38E00208)))
-#define VIC0VECTPRIORITY3 (*((uint32_t volatile*)(0x38E0020C)))
-#define VIC0VECTPRIORITY4 (*((uint32_t volatile*)(0x38E00210)))
-#define VIC0VECTPRIORITY5 (*((uint32_t volatile*)(0x38E00214)))
-#define VIC0VECTPRIORITY6 (*((uint32_t volatile*)(0x38E00218)))
-#define VIC0VECTPRIORITY7 (*((uint32_t volatile*)(0x38E0021C)))
-#define VIC0VECTPRIORITY8 (*((uint32_t volatile*)(0x38E00220)))
-#define VIC0VECTPRIORITY9 (*((uint32_t volatile*)(0x38E00224)))
-#define VIC0VECTPRIORITY10 (*((uint32_t volatile*)(0x38E00228)))
-#define VIC0VECTPRIORITY11 (*((uint32_t volatile*)(0x38E0022C)))
-#define VIC0VECTPRIORITY12 (*((uint32_t volatile*)(0x38E00230)))
-#define VIC0VECTPRIORITY13 (*((uint32_t volatile*)(0x38E00234)))
-#define VIC0VECTPRIORITY14 (*((uint32_t volatile*)(0x38E00238)))
-#define VIC0VECTPRIORITY15 (*((uint32_t volatile*)(0x38E0023C)))
-#define VIC0VECTPRIORITY16 (*((uint32_t volatile*)(0x38E00240)))
-#define VIC0VECTPRIORITY17 (*((uint32_t volatile*)(0x38E00244)))
-#define VIC0VECTPRIORITY18 (*((uint32_t volatile*)(0x38E00248)))
-#define VIC0VECTPRIORITY19 (*((uint32_t volatile*)(0x38E0024C)))
-#define VIC0VECTPRIORITY20 (*((uint32_t volatile*)(0x38E00250)))
-#define VIC0VECTPRIORITY21 (*((uint32_t volatile*)(0x38E00254)))
-#define VIC0VECTPRIORITY22 (*((uint32_t volatile*)(0x38E00258)))
-#define VIC0VECTPRIORITY23 (*((uint32_t volatile*)(0x38E0025C)))
-#define VIC0VECTPRIORITY24 (*((uint32_t volatile*)(0x38E00260)))
-#define VIC0VECTPRIORITY25 (*((uint32_t volatile*)(0x38E00264)))
-#define VIC0VECTPRIORITY26 (*((uint32_t volatile*)(0x38E00268)))
-#define VIC0VECTPRIORITY27 (*((uint32_t volatile*)(0x38E0026C)))
-#define VIC0VECTPRIORITY28 (*((uint32_t volatile*)(0x38E00270)))
-#define VIC0VECTPRIORITY29 (*((uint32_t volatile*)(0x38E00274)))
-#define VIC0VECTPRIORITY30 (*((uint32_t volatile*)(0x38E00278)))
-#define VIC0VECTPRIORITY31 (*((uint32_t volatile*)(0x38E0027C)))
-#define VIC0ADDRESS (*((void* volatile*)(0x38E00F00)))
-#define VIC1IRQSTATUS (*((uint32_t volatile*)(0x38E01000)))
-#define VIC1FIQSTATUS (*((uint32_t volatile*)(0x38E01004)))
-#define VIC1RAWINTR (*((uint32_t volatile*)(0x38E01008)))
-#define VIC1INTSELECT (*((uint32_t volatile*)(0x38E0100C)))
-#define VIC1INTENABLE (*((uint32_t volatile*)(0x38E01010)))
-#define VIC1INTENCLEAR (*((uint32_t volatile*)(0x38E01014)))
-#define VIC1SOFTINT (*((uint32_t volatile*)(0x38E01018)))
-#define VIC1SOFTINTCLEAR (*((uint32_t volatile*)(0x38E0101C)))
-#define VIC1PROTECTION (*((uint32_t volatile*)(0x38E01020)))
-#define VIC1SWPRIORITYMASK (*((uint32_t volatile*)(0x38E01024)))
-#define VIC1PRIORITYDAISY (*((uint32_t volatile*)(0x38E01028)))
-#define VIC1VECTADDR(i) (*((const void* volatile*)(0x38E01100 + 4 * (i))))
-#define VIC1VECTADDR0 (*((const void* volatile*)(0x38E01100)))
-#define VIC1VECTADDR1 (*((const void* volatile*)(0x38E01104)))
-#define VIC1VECTADDR2 (*((const void* volatile*)(0x38E01108)))
-#define VIC1VECTADDR3 (*((const void* volatile*)(0x38E0110C)))
-#define VIC1VECTADDR4 (*((const void* volatile*)(0x38E01110)))
-#define VIC1VECTADDR5 (*((const void* volatile*)(0x38E01114)))
-#define VIC1VECTADDR6 (*((const void* volatile*)(0x38E01118)))
-#define VIC1VECTADDR7 (*((const void* volatile*)(0x38E0111C)))
-#define VIC1VECTADDR8 (*((const void* volatile*)(0x38E01120)))
-#define VIC1VECTADDR9 (*((const void* volatile*)(0x38E01124)))
-#define VIC1VECTADDR10 (*((const void* volatile*)(0x38E01128)))
-#define VIC1VECTADDR11 (*((const void* volatile*)(0x38E0112C)))
-#define VIC1VECTADDR12 (*((const void* volatile*)(0x38E01130)))
-#define VIC1VECTADDR13 (*((const void* volatile*)(0x38E01134)))
-#define VIC1VECTADDR14 (*((const void* volatile*)(0x38E01138)))
-#define VIC1VECTADDR15 (*((const void* volatile*)(0x38E0113C)))
-#define VIC1VECTADDR16 (*((const void* volatile*)(0x38E01140)))
-#define VIC1VECTADDR17 (*((const void* volatile*)(0x38E01144)))
-#define VIC1VECTADDR18 (*((const void* volatile*)(0x38E01148)))
-#define VIC1VECTADDR19 (*((const void* volatile*)(0x38E0114C)))
-#define VIC1VECTADDR20 (*((const void* volatile*)(0x38E01150)))
-#define VIC1VECTADDR21 (*((const void* volatile*)(0x38E01154)))
-#define VIC1VECTADDR22 (*((const void* volatile*)(0x38E01158)))
-#define VIC1VECTADDR23 (*((const void* volatile*)(0x38E0115C)))
-#define VIC1VECTADDR24 (*((const void* volatile*)(0x38E01160)))
-#define VIC1VECTADDR25 (*((const void* volatile*)(0x38E01164)))
-#define VIC1VECTADDR26 (*((const void* volatile*)(0x38E01168)))
-#define VIC1VECTADDR27 (*((const void* volatile*)(0x38E0116C)))
-#define VIC1VECTADDR28 (*((const void* volatile*)(0x38E01170)))
-#define VIC1VECTADDR29 (*((const void* volatile*)(0x38E01174)))
-#define VIC1VECTADDR30 (*((const void* volatile*)(0x38E01178)))
-#define VIC1VECTADDR31 (*((const void* volatile*)(0x38E0117C)))
-#define VIC1VECTPRIORITY(i) (*((uint32_t volatile*)(0x38E01200 + 4 * (i))))
-#define VIC1VECTPRIORITY0 (*((uint32_t volatile*)(0x38E01200)))
-#define VIC1VECTPRIORITY1 (*((uint32_t volatile*)(0x38E01204)))
-#define VIC1VECTPRIORITY2 (*((uint32_t volatile*)(0x38E01208)))
-#define VIC1VECTPRIORITY3 (*((uint32_t volatile*)(0x38E0120C)))
-#define VIC1VECTPRIORITY4 (*((uint32_t volatile*)(0x38E01210)))
-#define VIC1VECTPRIORITY5 (*((uint32_t volatile*)(0x38E01214)))
-#define VIC1VECTPRIORITY6 (*((uint32_t volatile*)(0x38E01218)))
-#define VIC1VECTPRIORITY7 (*((uint32_t volatile*)(0x38E0121C)))
-#define VIC1VECTPRIORITY8 (*((uint32_t volatile*)(0x38E01220)))
-#define VIC1VECTPRIORITY9 (*((uint32_t volatile*)(0x38E01224)))
-#define VIC1VECTPRIORITY10 (*((uint32_t volatile*)(0x38E01228)))
-#define VIC1VECTPRIORITY11 (*((uint32_t volatile*)(0x38E0122C)))
-#define VIC1VECTPRIORITY12 (*((uint32_t volatile*)(0x38E01230)))
-#define VIC1VECTPRIORITY13 (*((uint32_t volatile*)(0x38E01234)))
-#define VIC1VECTPRIORITY14 (*((uint32_t volatile*)(0x38E01238)))
-#define VIC1VECTPRIORITY15 (*((uint32_t volatile*)(0x38E0123C)))
-#define VIC1VECTPRIORITY16 (*((uint32_t volatile*)(0x38E01240)))
-#define VIC1VECTPRIORITY17 (*((uint32_t volatile*)(0x38E01244)))
-#define VIC1VECTPRIORITY18 (*((uint32_t volatile*)(0x38E01248)))
-#define VIC1VECTPRIORITY19 (*((uint32_t volatile*)(0x38E0124C)))
-#define VIC1VECTPRIORITY20 (*((uint32_t volatile*)(0x38E01250)))
-#define VIC1VECTPRIORITY21 (*((uint32_t volatile*)(0x38E01254)))
-#define VIC1VECTPRIORITY22 (*((uint32_t volatile*)(0x38E01258)))
-#define VIC1VECTPRIORITY23 (*((uint32_t volatile*)(0x38E0125C)))
-#define VIC1VECTPRIORITY24 (*((uint32_t volatile*)(0x38E01260)))
-#define VIC1VECTPRIORITY25 (*((uint32_t volatile*)(0x38E01264)))
-#define VIC1VECTPRIORITY26 (*((uint32_t volatile*)(0x38E01268)))
-#define VIC1VECTPRIORITY27 (*((uint32_t volatile*)(0x38E0126C)))
-#define VIC1VECTPRIORITY28 (*((uint32_t volatile*)(0x38E01270)))
-#define VIC1VECTPRIORITY29 (*((uint32_t volatile*)(0x38E01274)))
-#define VIC1VECTPRIORITY30 (*((uint32_t volatile*)(0x38E01278)))
-#define VIC1VECTPRIORITY31 (*((uint32_t volatile*)(0x38E0127C)))
-#define VIC1ADDRESS (*((void* volatile*)(0x38E01F00)))
-
-
-/////GPIO/////
-#define PCON(i) (*((uint32_t volatile*)(0x3cf00000 + ((i) << 5))))
-#define PDAT(i) (*((uint32_t volatile*)(0x3cf00004 + ((i) << 5))))
-#define PUNA(i) (*((uint32_t volatile*)(0x3cf00008 + ((i) << 5))))
-#define PUNB(i) (*((uint32_t volatile*)(0x3cf0000c + ((i) << 5))))
-#define PCON0 (*((uint32_t volatile*)(0x3cf00000)))
-#define PDAT0 (*((uint32_t volatile*)(0x3cf00004)))
-#define PCON1 (*((uint32_t volatile*)(0x3cf00020)))
-#define PDAT1 (*((uint32_t volatile*)(0x3cf00024)))
-#define PCON2 (*((uint32_t volatile*)(0x3cf00040)))
-#define PDAT2 (*((uint32_t volatile*)(0x3cf00044)))
-#define PCON3 (*((uint32_t volatile*)(0x3cf00060)))
-#define PDAT3 (*((uint32_t volatile*)(0x3cf00064)))
-#define PCON4 (*((uint32_t volatile*)(0x3cf00080)))
-#define PDAT4 (*((uint32_t volatile*)(0x3cf00084)))
-#define PCON5 (*((uint32_t volatile*)(0x3cf000a0)))
-#define PDAT5 (*((uint32_t volatile*)(0x3cf000a4)))
-#define PCON6 (*((uint32_t volatile*)(0x3cf000c0)))
-#define PDAT6 (*((uint32_t volatile*)(0x3cf000c4)))
-#define PCON7 (*((uint32_t volatile*)(0x3cf000e0)))
-#define PDAT7 (*((uint32_t volatile*)(0x3cf000e4)))
-#define PCON8 (*((uint32_t volatile*)(0x3cf00100)))
-#define PDAT8 (*((uint32_t volatile*)(0x3cf00104)))
-#define PCON9 (*((uint32_t volatile*)(0x3cf00120)))
-#define PDAT9 (*((uint32_t volatile*)(0x3cf00124)))
-#define PCONA (*((uint32_t volatile*)(0x3cf00140)))
-#define PDATA (*((uint32_t volatile*)(0x3cf00144)))
-#define PCONB (*((uint32_t volatile*)(0x3cf00160)))
-#define PDATB (*((uint32_t volatile*)(0x3cf00164)))
-#define PCONC (*((uint32_t volatile*)(0x3cf00180)))
-#define PDATC (*((uint32_t volatile*)(0x3cf00184)))
-#define PCOND (*((uint32_t volatile*)(0x3cf001a0)))
-#define PDATD (*((uint32_t volatile*)(0x3cf001a4)))
-#define PCONE (*((uint32_t volatile*)(0x3cf001c0)))
-#define PDATE (*((uint32_t volatile*)(0x3cf001c4)))
-#define PCONF (*((uint32_t volatile*)(0x3cf001e0)))
-#define PDATF (*((uint32_t volatile*)(0x3cf001e4)))
-#define GPIOCMD (*((uint32_t volatile*)(0x3cf00200)))
-
-
-/////SPI/////
-#define SPIBASE(i) ((i) == 2 ? 0x3d200000 : \
- (i) == 1 ? 0x3ce00000 : \
- 0x3c300000)
-#define SPICLKGATE(i) ((i) == 2 ? 0x2f : \
- (i) == 1 ? 0x2b : \
- 0x22)
-#define SPIDMA(i) ((i) == 2 ? 0xd : \
- (i) == 1 ? 0xf : \
- 0x5)
-#define SPICTRL(i) (*((uint32_t volatile*)(SPIBASE(i))))
-#define SPISETUP(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x4)))
-#define SPISTATUS(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x8)))
-#define SPIUNKREG1(i) (*((uint32_t volatile*)(SPIBASE(i) + 0xc)))
-#define SPITXDATA(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x10)))
-#define SPIRXDATA(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x20)))
-#define SPICLKDIV(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x30)))
-#define SPIRXLIMIT(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x34)))
-#define SPIUNKREG3(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x38)))
-
-
-/////AES/////
-#define AESCONTROL (*((uint32_t volatile*)(0x38c00000)))
-#define AESGO (*((uint32_t volatile*)(0x38c00004)))
-#define AESUNKREG0 (*((uint32_t volatile*)(0x38c00008)))
-#define AESSTATUS (*((uint32_t volatile*)(0x38c0000c)))
-#define AESUNKREG1 (*((uint32_t volatile*)(0x38c00010)))
-#define AESKEYLEN (*((uint32_t volatile*)(0x38c00014)))
-#define AESOUTSIZE (*((uint32_t volatile*)(0x38c00018)))
-#define AESOUTADDR (*((void* volatile*)(0x38c00020)))
-#define AESINSIZE (*((uint32_t volatile*)(0x38c00024)))
-#define AESINADDR (*((const void* volatile*)(0x38c00028)))
-#define AESAUXSIZE (*((uint32_t volatile*)(0x38c0002c)))
-#define AESAUXADDR (*((void* volatile*)(0x38c00030)))
-#define AESSIZE3 (*((uint32_t volatile*)(0x38c00034)))
-#define AESKEY ((uint32_t volatile*)(0x38c0004c))
-#define AESTYPE (*((uint32_t volatile*)(0x38c0006c)))
-#define AESIV ((uint32_t volatile*)(0x38c00074))
-#define AESTYPE2 (*((uint32_t volatile*)(0x38c00088)))
-#define AESUNKREG2 (*((uint32_t volatile*)(0x38c0008c)))
-
-
-/////SHA1/////
-#define SHA1CONFIG (*((uint32_t volatile*)(0x38000000)))
-#define SHA1RESET (*((uint32_t volatile*)(0x38000004)))
-#define SHA1RESULT ((uint32_t volatile*)(0x38000020))
-#define SHA1DATAIN ((uint32_t volatile*)(0x38000040))
-
-
-/////DMA/////
-#ifndef ASM
-struct dma_lli
-{
- const void* srcaddr;
- void* dstaddr;
- const struct dma_lli* nextlli;
- uint32_t control;
-};
-#endif
-#define DMACINTSTS(d) (*((uint32_t volatile*)(0x38200000 + 0x1700000 * (d))))
-#define DMACINTTCSTS(d) (*((uint32_t volatile*)(0x38200004 + 0x1700000 * (d))))
-#define DMACINTTCCLR(d) (*((uint32_t volatile*)(0x38200008 + 0x1700000 * (d))))
-#define DMACINTERRSTS(d) (*((uint32_t volatile*)(0x3820000c + 0x1700000 * (d))))
-#define DMACINTERRCLR(d) (*((uint32_t volatile*)(0x38200010 + 0x1700000 * (d))))
-#define DMACRAWINTTCSTS(d) (*((uint32_t volatile*)(0x38200014 + 0x1700000 * (d))))
-#define DMACRAWINTERRSTS(d) (*((uint32_t volatile*)(0x38200018 + 0x1700000 * (d))))
-#define DMACENABLEDCHANS(d) (*((uint32_t volatile*)(0x3820001c + 0x1700000 * (d))))
-#define DMACSOFTBREQ(d) (*((uint32_t volatile*)(0x38200020 + 0x1700000 * (d))))
-#define DMACSOFTSREQ(d) (*((uint32_t volatile*)(0x38200024 + 0x1700000 * (d))))
-#define DMACSOFTLBREQ(d) (*((uint32_t volatile*)(0x38200028 + 0x1700000 * (d))))
-#define DMACSOFTLSREQ(d) (*((uint32_t volatile*)(0x3820002c + 0x1700000 * (d))))
-#define DMACCONFIG(d) (*((uint32_t volatile*)(0x38200030 + 0x1700000 * (d))))
-#define DMACSYNC(d) (*((uint32_t volatile*)(0x38200034 + 0x1700000 * (d))))
-#define DMACCLLI(d, c) (*((struct dma_lli volatile*)(0x38200100 + 0x1700000 * (d) + 0x20 * (c))))
-#define DMACCSRCADDR(d, c) (*((const void* volatile*)(0x38200100 + 0x1700000 * (d) + 0x20 * (c))))
-#define DMACCDESTADDR(d, c) (*((void* volatile*)(0x38200104 + 0x1700000 * (d) + 0x20 * (c))))
-#define DMACCNEXTLLI(d, c) (*((const void* volatile*)(0x38200108 + 0x1700000 * (d) + 0x20 * (c))))
-#define DMACCCONTROL(d, c) (*((uint32_t volatile*)(0x3820010c + 0x1700000 * (d) + 0x20 * (c))))
-#define DMACCCONFIG(d, c) (*((uint32_t volatile*)(0x38200110 + 0x1700000 * (d) + 0x20 * (c))))
-#define DMAC0INTSTS (*((uint32_t volatile*)(0x38200000)))
-#define DMAC0INTTCSTS (*((uint32_t volatile*)(0x38200004)))
-#define DMAC0INTTCCLR (*((uint32_t volatile*)(0x38200008)))
-#define DMAC0INTERRSTS (*((uint32_t volatile*)(0x3820000c)))
-#define DMAC0INTERRCLR (*((uint32_t volatile*)(0x38200010)))
-#define DMAC0RAWINTTCSTS (*((uint32_t volatile*)(0x38200014)))
-#define DMAC0RAWINTERRSTS (*((uint32_t volatile*)(0x38200018)))
-#define DMAC0ENABLEDCHANS (*((uint32_t volatile*)(0x3820001c)))
-#define DMAC0SOFTBREQ (*((uint32_t volatile*)(0x38200020)))
-#define DMAC0SOFTSREQ (*((uint32_t volatile*)(0x38200024)))
-#define DMAC0SOFTLBREQ (*((uint32_t volatile*)(0x38200028)))
-#define DMAC0SOFTLSREQ (*((uint32_t volatile*)(0x3820002c)))
-#define DMAC0CONFIG (*((uint32_t volatile*)(0x38200030)))
-#define DMAC0SYNC (*((uint32_t volatile*)(0x38200034)))
-#define DMAC0CLLI(c) (*((struct dma_lli volatile*)(0x38200100 + 0x20 * (c))))
-#define DMAC0CSRCADDR(c) (*((const void* volatile*)(0x38200100 + 0x20 * (c))))
-#define DMAC0CDESTADDR(c) (*((void* volatile*)(0x38200104 + 0x20 * (c))))
-#define DMAC0CNEXTLLI(c) (*((const void* volatile*)(0x38200108 + 0x20 * (c))))
-#define DMAC0CCONTROL(c) (*((uint32_t volatile*)(0x3820010c + 0x20 * (c))))
-#define DMAC0CCONFIG(c) (*((uint32_t volatile*)(0x38200110 + 0x20 * (c))))
-#define DMAC0C0LLI (*((struct dma_lli volatile*)(0x38200100)))
-#define DMAC0C0SRCADDR (*((const void* volatile*)(0x38200100)))
-#define DMAC0C0DESTADDR (*((void* volatile*)(0x38200104)))
-#define DMAC0C0NEXTLLI (*((const struct dma_lli* volatile*)(0x38200108)))
-#define DMAC0C0CONTROL (*((uint32_t volatile*)(0x3820010c)))
-#define DMAC0C0CONFIG (*((uint32_t volatile*)(0x38200110)))
-#define DMAC0C1LLI (*((struct dma_lli volatile*)(0x38200120)))
-#define DMAC0C1SRCADDR (*((const void* volatile*)(0x38200120)))
-#define DMAC0C1DESTADDR (*((void* volatile*)(0x38200124)))
-#define DMAC0C1NEXTLLI (*((const struct dma_lli* volatile*)(0x38200128)))
-#define DMAC0C1CONTROL (*((uint32_t volatile*)(0x3820012c)))
-#define DMAC0C1CONFIG (*((uint32_t volatile*)(0x38200130)))
-#define DMAC0C2LLI (*((struct dma_lli volatile*)(0x38200140)))
-#define DMAC0C2SRCADDR (*((const void* volatile*)(0x38200140)))
-#define DMAC0C2DESTADDR (*((void* volatile*)(0x38200144)))
-#define DMAC0C2NEXTLLI (*((const struct dma_lli* volatile*)(0x38200148)))
-#define DMAC0C2CONTROL (*((uint32_t volatile*)(0x3820014c)))
-#define DMAC0C2CONFIG (*((uint32_t volatile*)(0x38200150)))
-#define DMAC0C3LLI (*((struct dma_lli volatile*)(0x38200160)))
-#define DMAC0C3SRCADDR (*((const void* volatile*)(0x38200160)))
-#define DMAC0C3DESTADDR (*((void* volatile*)(0x38200164)))
-#define DMAC0C3NEXTLLI (*((const struct dma_lli* volatile*)(0x38200168)))
-#define DMAC0C3CONTROL (*((uint32_t volatile*)(0x3820016c)))
-#define DMAC0C3CONFIG (*((uint32_t volatile*)(0x38200170)))
-#define DMAC0C4LLI (*((struct dma_lli volatile*)(0x38200180)))
-#define DMAC0C4SRCADDR (*((const void* volatile*)(0x38200180)))
-#define DMAC0C4DESTADDR (*((void* volatile*)(0x38200184)))
-#define DMAC0C4NEXTLLI (*((const struct dma_lli* volatile*)(0x38200188)))
-#define DMAC0C4CONTROL (*((uint32_t volatile*)(0x3820018c)))
-#define DMAC0C4CONFIG (*((uint32_t volatile*)(0x38200190)))
-#define DMAC0C5LLI (*((struct dma_lli volatile*)(0x382001a0)))
-#define DMAC0C5SRCADDR (*((const void* volatile*)(0x382001a0)))
-#define DMAC0C5DESTADDR (*((void* volatile*)(0x382001a4)))
-#define DMAC0C5NEXTLLI (*((const struct dma_lli* volatile*)(0x382001a8)))
-#define DMAC0C5CONTROL (*((uint32_t volatile*)(0x382001ac)))
-#define DMAC0C5CONFIG (*((uint32_t volatile*)(0x382001b0)))
-#define DMAC0C6LLI (*((struct dma_lli volatile*)(0x382001c0)))
-#define DMAC0C6SRCADDR (*((const void* volatile*)(0x382001c0)))
-#define DMAC0C6DESTADDR (*((void* volatile*)(0x382001c4)))
-#define DMAC0C6NEXTLLI (*((const struct dma_lli* volatile*)(0x382001c8)))
-#define DMAC0C6CONTROL (*((uint32_t volatile*)(0x382001cc)))
-#define DMAC0C6CONFIG (*((uint32_t volatile*)(0x382001d0)))
-#define DMAC0C7LLI (*((struct dma_lli volatile*)(0x382001e0)))
-#define DMAC0C7SRCADDR (*((const void* volatile*)(0x382001e0)))
-#define DMAC0C7DESTADDR (*((void* volatile*)(0x382001e4)))
-#define DMAC0C7NEXTLLI (*((const struct dma_lli* volatile*)(0x382001e8)))
-#define DMAC0C7CONTROL (*((uint32_t volatile*)(0x382001ec)))
-#define DMAC0C7CONFIG (*((uint32_t volatile*)(0x382001f0)))
-#define DMAC1INTSTS (*((uint32_t volatile*)(0x39900000)))
-#define DMAC1INTTCSTS (*((uint32_t volatile*)(0x39900004)))
-#define DMAC1INTTCCLR (*((uint32_t volatile*)(0x39900008)))
-#define DMAC1INTERRSTS (*((uint32_t volatile*)(0x3990000c)))
-#define DMAC1INTERRCLR (*((uint32_t volatile*)(0x39900010)))
-#define DMAC1RAWINTTCSTS (*((uint32_t volatile*)(0x39900014)))
-#define DMAC1RAWINTERRSTS (*((uint32_t volatile*)(0x39900018)))
-#define DMAC1ENABLEDCHANS (*((uint32_t volatile*)(0x3990001c)))
-#define DMAC1SOFTBREQ (*((uint32_t volatile*)(0x39900020)))
-#define DMAC1SOFTSREQ (*((uint32_t volatile*)(0x39900024)))
-#define DMAC1SOFTLBREQ (*((uint32_t volatile*)(0x39900028)))
-#define DMAC1SOFTLSREQ (*((uint32_t volatile*)(0x3990002c)))
-#define DMAC1CONFIG (*((uint32_t volatile*)(0x39900030)))
-#define DMAC1SYNC (*((uint32_t volatile*)(0x39900034)))
-#define DMAC1CLLI(c) (*((struct dma_lli volatile*)(0x39900100 + 0x20 * (c))))
-#define DMAC1CSRCADDR(c) (*((const void* volatile*)(0x39900100 + 0x20 * (c))))
-#define DMAC1CDESTADDR(c) (*((void* volatile*)(0x39900104 + 0x20 * (c))))
-#define DMAC1CNEXTLLI(c) (*((const void* volatile*)(0x39900108 + 0x20 * (c))))
-#define DMAC1CCONTROL(c) (*((uint32_t volatile*)(0x3990010c + 0x20 * (c))))
-#define DMAC1CCONFIG(c) (*((uint32_t volatile*)(0x39900110 + 0x20 * (c))))
-#define DMAC1C0LLI (*((struct dma_lli volatile*)(0x39900100)))
-#define DMAC1C0SRCADDR (*((const void* volatile*)(0x39900100)))
-#define DMAC1C0DESTADDR (*((void* volatile*)(0x39900104)))
-#define DMAC1C0NEXTLLI (*((const struct dma_lli* volatile*)(0x39900108)))
-#define DMAC1C0CONTROL (*((uint32_t volatile*)(0x3990010c)))
-#define DMAC1C0CONFIG (*((uint32_t volatile*)(0x39900110)))
-#define DMAC1C1LLI (*((struct dma_lli volatile*)(0x39900120)))
-#define DMAC1C1SRCADDR (*((const void* volatile*)(0x39900120)))
-#define DMAC1C1DESTADDR (*((void* volatile*)(0x39900124)))
-#define DMAC1C1NEXTLLI (*((const struct dma_lli* volatile*)(0x39900128)))
-#define DMAC1C1CONTROL (*((uint32_t volatile*)(0x3990012c)))
-#define DMAC1C1CONFIG (*((uint32_t volatile*)(0x39900130)))
-#define DMAC1C2LLI (*((struct dma_lli volatile*)(0x39900140)))
-#define DMAC1C2SRCADDR (*((const void* volatile*)(0x39900140)))
-#define DMAC1C2DESTADDR (*((void* volatile*)(0x39900144)))
-#define DMAC1C2NEXTLLI (*((const struct dma_lli* volatile*)(0x39900148)))
-#define DMAC1C2CONTROL (*((uint32_t volatile*)(0x3990014c)))
-#define DMAC1C2CONFIG (*((uint32_t volatile*)(0x39900150)))
-#define DMAC1C3LLI (*((struct dma_lli volatile*)(0x39900160)))
-#define DMAC1C3SRCADDR (*((const void* volatile*)(0x39900160)))
-#define DMAC1C3DESTADDR (*((void* volatile*)(0x39900164)))
-#define DMAC1C3NEXTLLI (*((volatile void**)(0x39900168)))
-#define DMAC1C3CONTROL (*((uint32_t volatile*)(0x3990016c)))
-#define DMAC1C3CONFIG (*((uint32_t volatile*)(0x39900170)))
-#define DMAC1C4LLI (*((struct dma_lli volatile*)(0x39900180)))
-#define DMAC1C4SRCADDR (*((const void* volatile*)(0x39900180)))
-#define DMAC1C4DESTADDR (*((void* volatile*)(0x39900184)))
-#define DMAC1C4NEXTLLI (*((const struct dma_lli* volatile*)(0x39900188)))
-#define DMAC1C4CONTROL (*((uint32_t volatile*)(0x3990018c)))
-#define DMAC1C4CONFIG (*((uint32_t volatile*)(0x39900190)))
-#define DMAC1C5LLI (*((struct dma_lli volatile*)(0x399001a0)))
-#define DMAC1C5SRCADDR (*((const void* volatile*)(0x399001a0)))
-#define DMAC1C5DESTADDR (*((void* volatile*)(0x399001a4)))
-#define DMAC1C5NEXTLLI (*((const struct dma_lli* volatile*)(0x399001a8)))
-#define DMAC1C5CONTROL (*((uint32_t volatile*)(0x399001ac)))
-#define DMAC1C5CONFIG (*((uint32_t volatile*)(0x399001b0)))
-#define DMAC1C6LLI (*((struct dma_lli volatile*)(0x399001c0)))
-#define DMAC1C6SRCADDR (*((const void* volatile*)(0x399001c0)))
-#define DMAC1C6DESTADDR (*((void* volatile*)(0x399001c4)))
-#define DMAC1C6NEXTLLI (*((const struct dma_lli* volatile*)(0x399001c8)))
-#define DMAC1C6CONTROL (*((uint32_t volatile*)(0x399001cc)))
-#define DMAC1C6CONFIG (*((uint32_t volatile*)(0x399001d0)))
-#define DMAC1C7LLI (*((struct dma_lli volatile*)(0x399001e0)))
-#define DMAC1C7SRCADDR (*((const void* volatile*)(0x399001e0)))
-#define DMAC1C7DESTADDR (*((void* volatile*)(0x399001e4)))
-#define DMAC1C7NEXTLLI (*((const struct dma_lli* volatile*)(0x399001e8)))
-#define DMAC1C7CONTROL (*((uint32_t volatile*)(0x399001ec)))
-#define DMAC1C7CONFIG (*((uint32_t volatile*)(0x399001f0)))
-
-
-/////LCD/////
-#define LCD_BASE (0x38300000)
-#define LCD_CONFIG (*((uint32_t volatile*)(0x38300000)))
-#define LCD_WCMD (*((uint32_t volatile*)(0x38300004)))
-#define LCD_STATUS (*((uint32_t volatile*)(0x3830001c)))
-#define LCD_WDATA (*((uint32_t volatile*)(0x38300040)))
-
-
-/////ATA/////
-#define ATA_CONTROL (*((uint32_t volatile*)(0x38700000)))
-#define ATA_STATUS (*((uint32_t volatile*)(0x38700004)))
-#define ATA_COMMAND (*((uint32_t volatile*)(0x38700008)))
-#define ATA_SWRST (*((uint32_t volatile*)(0x3870000c)))
-#define ATA_IRQ (*((uint32_t volatile*)(0x38700010)))
-#define ATA_IRQ_MASK (*((uint32_t volatile*)(0x38700014)))
-#define ATA_CFG (*((uint32_t volatile*)(0x38700018)))
-#define ATA_MDMA_TIME (*((uint32_t volatile*)(0x38700028)))
-#define ATA_PIO_TIME (*((uint32_t volatile*)(0x3870002c)))
-#define ATA_UDMA_TIME (*((uint32_t volatile*)(0x38700030)))
-#define ATA_XFR_NUM (*((uint32_t volatile*)(0x38700034)))
-#define ATA_XFR_CNT (*((uint32_t volatile*)(0x38700038)))
-#define ATA_TBUF_START (*((void* volatile*)(0x3870003c)))
-#define ATA_TBUF_SIZE (*((uint32_t volatile*)(0x38700040)))
-#define ATA_SBUF_START (*((void* volatile*)(0x38700044)))
-#define ATA_SBUF_SIZE (*((uint32_t volatile*)(0x38700048)))
-#define ATA_CADR_TBUF (*((void* volatile*)(0x3870004c)))
-#define ATA_CADR_SBUF (*((void* volatile*)(0x38700050)))
-#define ATA_PIO_DTR (*((uint32_t volatile*)(0x38700054)))
-#define ATA_PIO_FED (*((uint32_t volatile*)(0x38700058)))
-#define ATA_PIO_SCR (*((uint32_t volatile*)(0x3870005c)))
-#define ATA_PIO_LLR (*((uint32_t volatile*)(0x38700060)))
-#define ATA_PIO_LMR (*((uint32_t volatile*)(0x38700064)))
-#define ATA_PIO_LHR (*((uint32_t volatile*)(0x38700068)))
-#define ATA_PIO_DVR (*((uint32_t volatile*)(0x3870006c)))
-#define ATA_PIO_CSD (*((uint32_t volatile*)(0x38700070)))
-#define ATA_PIO_DAD (*((uint32_t volatile*)(0x38700074)))
-#define ATA_PIO_READY (*((uint32_t volatile*)(0x38700078)))
-#define ATA_PIO_RDATA (*((uint32_t volatile*)(0x3870007c)))
-#define ATA_BUS_FIFO_STATUS (*((uint32_t volatile*)(0x38700080)))
-#define ATA_FIFO_STATUS (*((uint32_t volatile*)(0x38700084)))
-#define ATA_DMA_ADDR (*((void* volatile*)(0x38700088)))
-
-
-/////SDCI/////
-#define SDCI_CTRL (*((uint32_t volatile*)(0x38b00000)))
-#define SDCI_DCTRL (*((uint32_t volatile*)(0x38b00004)))
-#define SDCI_CMD (*((uint32_t volatile*)(0x38b00008)))
-#define SDCI_ARGU (*((uint32_t volatile*)(0x38b0000c)))
-#define SDCI_STATE (*((uint32_t volatile*)(0x38b00010)))
-#define SDCI_STAC (*((uint32_t volatile*)(0x38b00014)))
-#define SDCI_DSTA (*((uint32_t volatile*)(0x38b00018)))
-#define SDCI_FSTA (*((uint32_t volatile*)(0x38b0001c)))
-#define SDCI_RESP0 (*((uint32_t volatile*)(0x38b00020)))
-#define SDCI_RESP1 (*((uint32_t volatile*)(0x38b00024)))
-#define SDCI_RESP2 (*((uint32_t volatile*)(0x38b00028)))
-#define SDCI_RESP3 (*((uint32_t volatile*)(0x38b0002c)))
-#define SDCI_CDIV (*((uint32_t volatile*)(0x38b00030)))
-#define SDCI_SDIO_CSR (*((uint32_t volatile*)(0x38b00034)))
-#define SDCI_IRQ (*((uint32_t volatile*)(0x38b00038)))
-#define SDCI_IRQ_MASK (*((uint32_t volatile*)(0x38b0003c)))
-#define SDCI_DATA (*((uint32_t volatile*)(0x38b00040)))
-#define SDCI_DMAADDR (*((void* volatile*)(0x38b00044)))
-#define SDCI_DMASIZE (*((uint32_t volatile*)(0x38b00048)))
-#define SDCI_DMACOUNT (*((uint32_t volatile*)(0x38b0004c)))
-#define SDCI_RESET (*((uint32_t volatile*)(0x38b0006c)))
-
-#define SDCI_CTRL_SDCIEN BIT(0)
-#define SDCI_CTRL_CARD_TYPE_MASK BIT(1)
-#define SDCI_CTRL_CARD_TYPE_SD 0
-#define SDCI_CTRL_CARD_TYPE_MMC BIT(1)
-#define SDCI_CTRL_BUS_WIDTH_MASK BITRANGE(2, 3)
-#define SDCI_CTRL_BUS_WIDTH_1BIT 0
-#define SDCI_CTRL_BUS_WIDTH_4BIT BIT(2)
-#define SDCI_CTRL_BUS_WIDTH_8BIT BIT(3)
-#define SDCI_CTRL_DMA_EN BIT(4)
-#define SDCI_CTRL_L_ENDIAN BIT(5)
-#define SDCI_CTRL_DMA_REQ_CON_MASK BIT(6)
-#define SDCI_CTRL_DMA_REQ_CON_NEMPTY 0
-#define SDCI_CTRL_DMA_REQ_CON_FULL BIT(6)
-#define SDCI_CTRL_CLK_SEL_MASK BIT(7)
-#define SDCI_CTRL_CLK_SEL_PCLK 0
-#define SDCI_CTRL_CLK_SEL_SDCLK BIT(7)
-#define SDCI_CTRL_BIT_8 BIT(8)
-#define SDCI_CTRL_BIT_14 BIT(14)
-
-#define SDCI_DCTRL_TXFIFORST BIT(0)
-#define SDCI_DCTRL_RXFIFORST BIT(1)
-#define SDCI_DCTRL_TRCONT_MASK BITRANGE(4, 5)
-#define SDCI_DCTRL_TRCONT_TX BIT(4)
-#define SDCI_DCTRL_BUS_TEST_MASK BITRANGE(6, 7)
-#define SDCI_DCTRL_BUS_TEST_TX BIT(6)
-#define SDCI_DCTRL_BUS_TEST_RX BIT(7)
-
-#define SDCI_CDIV_CLKDIV_MASK BITRANGE(0, 7)
-#define SDCI_CDIV_CLKDIV(x) ((x) >> 1)
-#define SDCI_CDIV_CLKDIV_2 BIT(0)
-#define SDCI_CDIV_CLKDIV_4 BIT(1)
-#define SDCI_CDIV_CLKDIV_8 BIT(2)
-#define SDCI_CDIV_CLKDIV_16 BIT(3)
-#define SDCI_CDIV_CLKDIV_32 BIT(4)
-#define SDCI_CDIV_CLKDIV_64 BIT(5)
-#define SDCI_CDIV_CLKDIV_128 BIT(6)
-#define SDCI_CDIV_CLKDIV_256 BIT(7)
-
-#define SDCI_CMD_CMD_NUM_MASK BITRANGE(0, 5)
-#define SDCI_CMD_CMD_NUM_SHIFT 0
-#define SDCI_CMD_CMD_NUM(x) (x)
-#define SDCI_CMD_CMD_TYPE_MASK BITRANGE(6, 7)
-#define SDCI_CMD_CMD_TYPE_BC 0
-#define SDCI_CMD_CMD_TYPE_BCR BIT(6)
-#define SDCI_CMD_CMD_TYPE_AC BIT(7)
-#define SDCI_CMD_CMD_TYPE_ADTC (BIT(6) | BIT(7))
-#define SDCI_CMD_CMD_RD_WR BIT(8)
-#define SDCI_CMD_RES_TYPE_MASK BITRANGE(16, 18)
-#define SDCI_CMD_RES_TYPE_NONE 0
-#define SDCI_CMD_RES_TYPE_R1 BIT(16)
-#define SDCI_CMD_RES_TYPE_R2 BIT(17)
-#define SDCI_CMD_RES_TYPE_R3 (BIT(16) | BIT(17))
-#define SDCI_CMD_RES_TYPE_R4 BIT(18)
-#define SDCI_CMD_RES_TYPE_R5 (BIT(16) | BIT(18))
-#define SDCI_CMD_RES_TYPE_R6 (BIT(17) | BIT(18))
-#define SDCI_CMD_RES_BUSY BIT(19)
-#define SDCI_CMD_RES_SIZE_MASK BIT(20)
-#define SDCI_CMD_RES_SIZE_48 0
-#define SDCI_CMD_RES_SIZE_136 BIT(20)
-#define SDCI_CMD_NCR_NID_MASK BIT(21)
-#define SDCI_CMD_NCR_NID_NCR 0
-#define SDCI_CMD_NCR_NID_NID BIT(21)
-#define SDCI_CMD_CMDSTR BIT(31)
-
-#define SDCI_STATE_DAT_STATE_MASK BITRANGE(0, 3)
-#define SDCI_STATE_DAT_STATE_IDLE 0
-#define SDCI_STATE_DAT_STATE_DAT_RCV BIT(0)
-#define SDCI_STATE_DAT_STATE_CRC_RCV BIT(1)
-#define SDCI_STATE_DAT_STATE_DAT_END (BIT(0) | BIT(1))
-#define SDCI_STATE_DAT_STATE_DAT_SET BIT(2)
-#define SDCI_STATE_DAT_STATE_DAT_OUT (BIT(0) | BIT(2))
-#define SDCI_STATE_DAT_STATE_CRC_TIME (BIT(1) | BIT(2))
-#define SDCI_STATE_DAT_STATE_CRC_OUT (BIT(0) | BIT(1) | BIT(2))
-#define SDCI_STATE_DAT_STATE_ENDB_OUT BIT(3)
-#define SDCI_STATE_DAT_STATE_ENDB_STOD (BIT(0) | BIT(3))
-#define SDCI_STATE_DAT_STATE_DAT_CRCR (BIT(1) | BIT(3))
-#define SDCI_STATE_DAT_STATE_CARD_PRG (BIT(0) | BIT(1) | BIT(3))
-#define SDCI_STATE_DAT_STATE_DAT_BUSY (BIT(2) | BIT(3))
-#define SDCI_STATE_CMD_STATE_MASK (BIT(4) | BIT(5) | BIT(6))
-#define SDCI_STATE_CMD_STATE_CMD_IDLE 0
-#define SDCI_STATE_CMD_STATE_CMD_CMDO BIT(4)
-#define SDCI_STATE_CMD_STATE_CMD_CRCO BIT(5)
-#define SDCI_STATE_CMD_STATE_CMD_TOUT (BIT(4) | BIT(5))
-#define SDCI_STATE_CMD_STATE_CMD_RESR BIT(6)
-#define SDCI_STATE_CMD_STATE_CMD_INTV (BIT(4) | BIT(6))
-
-#define SDCI_STAC_CLR_CMDEND BIT(2)
-#define SDCI_STAC_CLR_BIT_3 BIT(3)
-#define SDCI_STAC_CLR_RESEND BIT(4)
-#define SDCI_STAC_CLR_DATEND BIT(6)
-#define SDCI_STAC_CLR_DAT_CRCEND BIT(7)
-#define SDCI_STAC_CLR_CRC_STAEND BIT(8)
-#define SDCI_STAC_CLR_RESTOUTE BIT(15)
-#define SDCI_STAC_CLR_RESENDE BIT(16)
-#define SDCI_STAC_CLR_RESINDE BIT(17)
-#define SDCI_STAC_CLR_RESCRCE BIT(18)
-#define SDCI_STAC_CLR_WR_DATCRCE BIT(22)
-#define SDCI_STAC_CLR_RD_DATCRCE BIT(23)
-#define SDCI_STAC_CLR_RD_DATENDE0 BIT(24)
-#define SDCI_STAC_CLR_RD_DATENDE1 BIT(25)
-#define SDCI_STAC_CLR_RD_DATENDE2 BIT(26)
-#define SDCI_STAC_CLR_RD_DATENDE3 BIT(27)
-#define SDCI_STAC_CLR_RD_DATENDE4 BIT(28)
-#define SDCI_STAC_CLR_RD_DATENDE5 BIT(29)
-#define SDCI_STAC_CLR_RD_DATENDE6 BIT(30)
-#define SDCI_STAC_CLR_RD_DATENDE7 BIT(31)
-
-#define SDCI_DSTA_CMDRDY BIT(0)
-#define SDCI_DSTA_CMDPRO BIT(1)
-#define SDCI_DSTA_CMDEND BIT(2)
-#define SDCI_DSTA_RESPRO BIT(3)
-#define SDCI_DSTA_RESEND BIT(4)
-#define SDCI_DSTA_DATPRO BIT(5)
-#define SDCI_DSTA_DATEND BIT(6)
-#define SDCI_DSTA_DAT_CRCEND BIT(7)
-#define SDCI_DSTA_CRC_STAEND BIT(8)
-#define SDCI_DSTA_DAT_BUSY BIT(9)
-#define SDCI_DSTA_SDCLK_HOLD BIT(12)
-#define SDCI_DSTA_DAT0_STATUS BIT(13)
-#define SDCI_DSTA_WP_DECT_INPUT BIT(14)
-#define SDCI_DSTA_RESTOUTE BIT(15)
-#define SDCI_DSTA_RESENDE BIT(16)
-#define SDCI_DSTA_RESINDE BIT(17)
-#define SDCI_DSTA_RESCRCE BIT(18)
-#define SDCI_DSTA_WR_CRC_STATUS_MASK BITRANGE(19, 21)
-#define SDCI_DSTA_WR_CRC_STATUS_OK BIT(20)
-#define SDCI_DSTA_WR_CRC_STATUS_TXERR (BIT(19) | BIT(21))
-#define SDCI_DSTA_WR_CRC_STATUS_CARDERR (BIT(19) | BIT(20) | BIT(21))
-#define SDCI_DSTA_WR_DATCRCE BIT(22)
-#define SDCI_DSTA_RD_DATCRCE BIT(23)
-#define SDCI_DSTA_RD_DATENDE0 BIT(24)
-#define SDCI_DSTA_RD_DATENDE1 BIT(25)
-#define SDCI_DSTA_RD_DATENDE2 BIT(26)
-#define SDCI_DSTA_RD_DATENDE3 BIT(27)
-#define SDCI_DSTA_RD_DATENDE4 BIT(28)
-#define SDCI_DSTA_RD_DATENDE5 BIT(29)
-#define SDCI_DSTA_RD_DATENDE6 BIT(30)
-#define SDCI_DSTA_RD_DATENDE7 BIT(31)
-
-#define SDCI_FSTA_RX_FIFO_EMPTY BIT(0)
-#define SDCI_FSTA_RX_FIFO_FULL BIT(1)
-#define SDCI_FSTA_TX_FIFO_EMPTY BIT(2)
-#define SDCI_FSTA_TX_FIFO_FULL BIT(3)
-
-#define SDCI_SDIO_CSR_SDIO_RW_EN BIT(0)
-#define SDCI_SDIO_CSR_SDIO_INT_EN BIT(1)
-#define SDCI_SDIO_CSR_SDIO_RW_REQ BIT(2)
-#define SDCI_SDIO_CSR_SDIO_RW_STOP BIT(3)
-#define SDCI_SDIO_CSR_SDIO_INT_PERIOD_MASK BIT(4)
-#define SDCI_SDIO_CSR_SDIO_INT_PERIOD_MORE 0
-#define SDCI_SDIO_CSR_SDIO_INT_PERIOD_XACT BIT(4)
-
-#define SDCI_IRQ_DAT_DONE_INT BIT(0)
-#define SDCI_IRQ_IOCARD_IRQ_INT BIT(1)
-#define SDCI_IRQ_READ_WAIT_INT BIT(2)
-
-#define SDCI_IRQ_MASK_MASK_DAT_DONE_INT BIT(0)
-#define SDCI_IRQ_MASK_MASK_IOCARD_IRQ_INT BIT(1)
-#define SDCI_IRQ_MASK_MASK_READ_WAIT_INT BIT(2)
-
-
-/////CLICKWHEEL/////
-#define WHEEL00 (*((uint32_t volatile*)(0x3C200000)))
-#define WHEEL04 (*((uint32_t volatile*)(0x3C200004)))
-#define WHEEL08 (*((uint32_t volatile*)(0x3C200008)))
-#define WHEEL0C (*((uint32_t volatile*)(0x3C20000C)))
-#define WHEEL10 (*((uint32_t volatile*)(0x3C200010)))
-#define WHEELINT (*((uint32_t volatile*)(0x3C200014)))
-#define WHEELRX (*((uint32_t volatile*)(0x3C200018)))
-#define WHEELTX (*((uint32_t volatile*)(0x3C20001C)))
-
-
-/////I2S/////
-#define I2SCLKCON (*((volatile uint32_t*)(0x3CA00000)))
-#define I2STXCON (*((volatile uint32_t*)(0x3CA00004)))
-#define I2STXCOM (*((volatile uint32_t*)(0x3CA00008)))
-#define I2STXDB0 (*((volatile uint32_t*)(0x3CA00010)))
-#define I2SRXCON (*((volatile uint32_t*)(0x3CA00030)))
-#define I2SRXCOM (*((volatile uint32_t*)(0x3CA00034)))
-#define I2SRXDB (*((volatile uint32_t*)(0x3CA00038)))
-#define I2SSTATUS (*((volatile uint32_t*)(0x3CA0003C)))
-#define I2S40 (*((volatile uint32_t*)(0x3CA00040)))
-
-
-/////CLOCK GATES/////
-#define CLOCKGATE_USB_1 2
-#define CLOCKGATE_USB_2 35
-
-
-/////INTERRUPTS/////
-#define IRQ_TIMER 8
-#define IRQ_USB_FUNC 19
-#define IRQ_DMAC(d) 16 + d
-#define IRQ_DMAC0 16
-#define IRQ_DMAC1 17
-#define IRQ_WHEEL 23
-#define IRQ_ATA 29
-#define IRQ_MMC 44
-
-
-#endif
-
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: s5l8700.h 28791 2010-12-11 09:39:33Z Buschel $ + * + * Copyright (C) 2008 by Marcoen Hirschberg, Bart van Adrichem + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef __S5L8702_H__ +#define __S5L8702_H__ + +#include <inttypes.h> + +#define REG8_PTR_T volatile uint8_t * +#define REG16_PTR_T volatile uint16_t * +#define REG32_PTR_T volatile uint32_t * + +#define TIMER_FREQ 54000000 + +#define CACHEALIGN_BITS (4) /* 2^4 = 16 bytes */ + +#define DRAM_ORIG 0x08000000 +#define IRAM_ORIG 0 + +#define DRAM_SIZE (MEMORYSIZE * 0x100000) +#define IRAM_SIZE 0x40000 + +#define TTB_SIZE 0x4000 +#define TTB_BASE_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE) + +/////SYSTEM CONTROLLER///// +#define CLKCON0 (*((volatile uint32_t*)(0x3C500000))) +#define CLKCON1 (*((volatile uint32_t*)(0x3C500004))) +#define CLKCON2 (*((volatile uint32_t*)(0x3C500008))) +#define CLKCON3 (*((volatile uint32_t*)(0x3C50000C))) +#define CLKCON4 (*((volatile uint32_t*)(0x3C500010))) +#define CLKCON5 (*((volatile uint32_t*)(0x3C500014))) +#define PLL0PMS (*((volatile uint32_t*)(0x3C500020))) +#define PLL1PMS (*((volatile uint32_t*)(0x3C500024))) +#define PLL2PMS (*((volatile uint32_t*)(0x3C500028))) +#define PLL0LCNT (*((volatile uint32_t*)(0x3C500030))) +#define PLL1LCNT (*((volatile uint32_t*)(0x3C500034))) +#define PLL2LCNT (*((volatile uint32_t*)(0x3C500038))) +#define PLLLOCK (*((volatile uint32_t*)(0x3C500040))) +#define PLLMODE (*((volatile uint32_t*)(0x3C500044))) +#define PWRCON(i) (*((uint32_t volatile*)(0x3C500000 \ + + ((i) == 4 ? 0x6C : \ + ((i) == 3 ? 0x68 : \ + ((i) == 2 ? 0x58 : \ + ((i) == 1 ? 0x4C : \ + 0x48))))))) + + +/////TIMER///// +#define TACON (*((uint32_t volatile*)(0x3C700000))) +#define TACMD (*((uint32_t volatile*)(0x3C700004))) +#define TADATA0 (*((uint32_t volatile*)(0x3C700008))) +#define TADATA1 (*((uint32_t volatile*)(0x3C70000C))) +#define TAPRE (*((uint32_t volatile*)(0x3C700010))) +#define TACNT (*((uint32_t volatile*)(0x3C700014))) +#define TBCON (*((uint32_t volatile*)(0x3C700020))) +#define TBCMD (*((uint32_t volatile*)(0x3C700024))) +#define TBDATA0 (*((uint32_t volatile*)(0x3C700028))) +#define TBDATA1 (*((uint32_t volatile*)(0x3C70002C))) +#define TBPRE (*((uint32_t volatile*)(0x3C700030))) +#define TBCNT (*((uint32_t volatile*)(0x3C700034))) +#define TCCON (*((uint32_t volatile*)(0x3C700040))) +#define TCCMD (*((uint32_t volatile*)(0x3C700044))) +#define TCDATA0 (*((uint32_t volatile*)(0x3C700048))) +#define TCDATA1 (*((uint32_t volatile*)(0x3C70004C))) +#define TCPRE (*((uint32_t volatile*)(0x3C700050))) +#define TCCNT (*((uint32_t volatile*)(0x3C700054))) +#define TDCON (*((uint32_t volatile*)(0x3C700060))) +#define TDCMD (*((uint32_t volatile*)(0x3C700064))) +#define TDDATA0 (*((uint32_t volatile*)(0x3C700068))) +#define TDDATA1 (*((uint32_t volatile*)(0x3C70006C))) +#define TDPRE (*((uint32_t volatile*)(0x3C700070))) +#define TDCNT (*((uint32_t volatile*)(0x3C700074))) +#define TECON (*((uint32_t volatile*)(0x3C7000A0))) +#define TECMD (*((uint32_t volatile*)(0x3C7000A4))) +#define TEDATA0 (*((uint32_t volatile*)(0x3C7000A8))) +#define TEDATA1 (*((uint32_t volatile*)(0x3C7000AC))) +#define TEPRE (*((uint32_t volatile*)(0x3C7000B0))) +#define TECNT (*((uint32_t volatile*)(0x3C7000B4))) +#define TFCON (*((uint32_t volatile*)(0x3C7000C0))) +#define TFCMD (*((uint32_t volatile*)(0x3C7000C4))) +#define TFDATA0 (*((uint32_t volatile*)(0x3C7000C8))) +#define TFDATA1 (*((uint32_t volatile*)(0x3C7000CC))) +#define TFPRE (*((uint32_t volatile*)(0x3C7000D0))) +#define TFCNT (*((uint32_t volatile*)(0x3C7000D4))) +#define TGCON (*((uint32_t volatile*)(0x3C7000E0))) +#define TGCMD (*((uint32_t volatile*)(0x3C7000E4))) +#define TGDATA0 (*((uint32_t volatile*)(0x3C7000E8))) +#define TGDATA1 (*((uint32_t volatile*)(0x3C7000EC))) +#define TGPRE (*((uint32_t volatile*)(0x3C7000F0))) +#define TGCNT (*((uint32_t volatile*)(0x3C7000F4))) +#define THCON (*((uint32_t volatile*)(0x3C700100))) +#define THCMD (*((uint32_t volatile*)(0x3C700104))) +#define THDATA0 (*((uint32_t volatile*)(0x3C700108))) +#define THDATA1 (*((uint32_t volatile*)(0x3C70010C))) +#define THPRE (*((uint32_t volatile*)(0x3C700110))) +#define THCNT (*((uint32_t volatile*)(0x3C700114))) +#define USEC_TIMER TECNT + + +/////USB///// +#define OTGBASE 0x38400000 +#define PHYBASE 0x3C400000 +#define SYNOPSYSOTG_CLOCK 0 +#define SYNOPSYSOTG_AHBCFG 0x2B + + +/////I2C///// +#define IICCON(bus) (*((uint32_t volatile*)(0x3C600000 + 0x300000 * (bus)))) +#define IICSTAT(bus) (*((uint32_t volatile*)(0x3C600004 + 0x300000 * (bus)))) +#define IICADD(bus) (*((uint32_t volatile*)(0x3C600008 + 0x300000 * (bus)))) +#define IICDS(bus) (*((uint32_t volatile*)(0x3C60000C + 0x300000 * (bus)))) + + +/////INTERRUPT CONTROLLERS///// +#define VICIRQSTATUS(v) (*((uint32_t volatile*)(0x38E00000 + 0x1000 * (v)))) +#define VICFIQSTATUS(v) (*((uint32_t volatile*)(0x38E00004 + 0x1000 * (v)))) +#define VICRAWINTR(v) (*((uint32_t volatile*)(0x38E00008 + 0x1000 * (v)))) +#define VICINTSELECT(v) (*((uint32_t volatile*)(0x38E0000C + 0x1000 * (v)))) +#define VICINTENABLE(v) (*((uint32_t volatile*)(0x38E00010 + 0x1000 * (v)))) +#define VICINTENCLEAR(v) (*((uint32_t volatile*)(0x38E00014 + 0x1000 * (v)))) +#define VICSOFTINT(v) (*((uint32_t volatile*)(0x38E00018 + 0x1000 * (v)))) +#define VICSOFTINTCLEAR(v) (*((uint32_t volatile*)(0x38E0001C + 0x1000 * (v)))) +#define VICPROTECTION(v) (*((uint32_t volatile*)(0x38E00020 + 0x1000 * (v)))) +#define VICSWPRIORITYMASK(v) (*((uint32_t volatile*)(0x38E00024 + 0x1000 * (v)))) +#define VICPRIORITYDAISY(v) (*((uint32_t volatile*)(0x38E00028 + 0x1000 * (v)))) +#define VICVECTADDR(v, i) (*((uint32_t volatile*)(0x38E00100 + 0x1000 * (v) + 4 * (i)))) +#define VICVECTPRIORITY(v, i) (*((uint32_t volatile*)(0x38E00200 + 0x1000 * (v) + 4 * (i)))) +#define VICADDRESS(v) (*((const void* volatile*)(0x38E00F00 + 0x1000 * (v)))) +#define VIC0IRQSTATUS (*((uint32_t volatile*)(0x38E00000))) +#define VIC0FIQSTATUS (*((uint32_t volatile*)(0x38E00004))) +#define VIC0RAWINTR (*((uint32_t volatile*)(0x38E00008))) +#define VIC0INTSELECT (*((uint32_t volatile*)(0x38E0000C))) +#define VIC0INTENABLE (*((uint32_t volatile*)(0x38E00010))) +#define VIC0INTENCLEAR (*((uint32_t volatile*)(0x38E00014))) +#define VIC0SOFTINT (*((uint32_t volatile*)(0x38E00018))) +#define VIC0SOFTINTCLEAR (*((uint32_t volatile*)(0x38E0001C))) +#define VIC0PROTECTION (*((uint32_t volatile*)(0x38E00020))) +#define VIC0SWPRIORITYMASK (*((uint32_t volatile*)(0x38E00024))) +#define VIC0PRIORITYDAISY (*((uint32_t volatile*)(0x38E00028))) +#define VIC0VECTADDR(i) (*((const void* volatile*)(0x38E00100 + 4 * (i)))) +#define VIC0VECTADDR0 (*((const void* volatile*)(0x38E00100))) +#define VIC0VECTADDR1 (*((const void* volatile*)(0x38E00104))) +#define VIC0VECTADDR2 (*((const void* volatile*)(0x38E00108))) +#define VIC0VECTADDR3 (*((const void* volatile*)(0x38E0010C))) +#define VIC0VECTADDR4 (*((const void* volatile*)(0x38E00110))) +#define VIC0VECTADDR5 (*((const void* volatile*)(0x38E00114))) +#define VIC0VECTADDR6 (*((const void* volatile*)(0x38E00118))) +#define VIC0VECTADDR7 (*((const void* volatile*)(0x38E0011C))) +#define VIC0VECTADDR8 (*((const void* volatile*)(0x38E00120))) +#define VIC0VECTADDR9 (*((const void* volatile*)(0x38E00124))) +#define VIC0VECTADDR10 (*((const void* volatile*)(0x38E00128))) +#define VIC0VECTADDR11 (*((const void* volatile*)(0x38E0012C))) +#define VIC0VECTADDR12 (*((const void* volatile*)(0x38E00130))) +#define VIC0VECTADDR13 (*((const void* volatile*)(0x38E00134))) +#define VIC0VECTADDR14 (*((const void* volatile*)(0x38E00138))) +#define VIC0VECTADDR15 (*((const void* volatile*)(0x38E0013C))) +#define VIC0VECTADDR16 (*((const void* volatile*)(0x38E00140))) +#define VIC0VECTADDR17 (*((const void* volatile*)(0x38E00144))) +#define VIC0VECTADDR18 (*((const void* volatile*)(0x38E00148))) +#define VIC0VECTADDR19 (*((const void* volatile*)(0x38E0014C))) +#define VIC0VECTADDR20 (*((const void* volatile*)(0x38E00150))) +#define VIC0VECTADDR21 (*((const void* volatile*)(0x38E00154))) +#define VIC0VECTADDR22 (*((const void* volatile*)(0x38E00158))) +#define VIC0VECTADDR23 (*((const void* volatile*)(0x38E0015C))) +#define VIC0VECTADDR24 (*((const void* volatile*)(0x38E00160))) +#define VIC0VECTADDR25 (*((const void* volatile*)(0x38E00164))) +#define VIC0VECTADDR26 (*((const void* volatile*)(0x38E00168))) +#define VIC0VECTADDR27 (*((const void* volatile*)(0x38E0016C))) +#define VIC0VECTADDR28 (*((const void* volatile*)(0x38E00170))) +#define VIC0VECTADDR29 (*((const void* volatile*)(0x38E00174))) +#define VIC0VECTADDR30 (*((const void* volatile*)(0x38E00178))) +#define VIC0VECTADDR31 (*((const void* volatile*)(0x38E0017C))) +#define VIC0VECTPRIORITY(i) (*((uint32_t volatile*)(0x38E00200 + 4 * (i)))) +#define VIC0VECTPRIORITY0 (*((uint32_t volatile*)(0x38E00200))) +#define VIC0VECTPRIORITY1 (*((uint32_t volatile*)(0x38E00204))) +#define VIC0VECTPRIORITY2 (*((uint32_t volatile*)(0x38E00208))) +#define VIC0VECTPRIORITY3 (*((uint32_t volatile*)(0x38E0020C))) +#define VIC0VECTPRIORITY4 (*((uint32_t volatile*)(0x38E00210))) +#define VIC0VECTPRIORITY5 (*((uint32_t volatile*)(0x38E00214))) +#define VIC0VECTPRIORITY6 (*((uint32_t volatile*)(0x38E00218))) +#define VIC0VECTPRIORITY7 (*((uint32_t volatile*)(0x38E0021C))) +#define VIC0VECTPRIORITY8 (*((uint32_t volatile*)(0x38E00220))) +#define VIC0VECTPRIORITY9 (*((uint32_t volatile*)(0x38E00224))) +#define VIC0VECTPRIORITY10 (*((uint32_t volatile*)(0x38E00228))) +#define VIC0VECTPRIORITY11 (*((uint32_t volatile*)(0x38E0022C))) +#define VIC0VECTPRIORITY12 (*((uint32_t volatile*)(0x38E00230))) +#define VIC0VECTPRIORITY13 (*((uint32_t volatile*)(0x38E00234))) +#define VIC0VECTPRIORITY14 (*((uint32_t volatile*)(0x38E00238))) +#define VIC0VECTPRIORITY15 (*((uint32_t volatile*)(0x38E0023C))) +#define VIC0VECTPRIORITY16 (*((uint32_t volatile*)(0x38E00240))) +#define VIC0VECTPRIORITY17 (*((uint32_t volatile*)(0x38E00244))) +#define VIC0VECTPRIORITY18 (*((uint32_t volatile*)(0x38E00248))) +#define VIC0VECTPRIORITY19 (*((uint32_t volatile*)(0x38E0024C))) +#define VIC0VECTPRIORITY20 (*((uint32_t volatile*)(0x38E00250))) +#define VIC0VECTPRIORITY21 (*((uint32_t volatile*)(0x38E00254))) +#define VIC0VECTPRIORITY22 (*((uint32_t volatile*)(0x38E00258))) +#define VIC0VECTPRIORITY23 (*((uint32_t volatile*)(0x38E0025C))) +#define VIC0VECTPRIORITY24 (*((uint32_t volatile*)(0x38E00260))) +#define VIC0VECTPRIORITY25 (*((uint32_t volatile*)(0x38E00264))) +#define VIC0VECTPRIORITY26 (*((uint32_t volatile*)(0x38E00268))) +#define VIC0VECTPRIORITY27 (*((uint32_t volatile*)(0x38E0026C))) +#define VIC0VECTPRIORITY28 (*((uint32_t volatile*)(0x38E00270))) +#define VIC0VECTPRIORITY29 (*((uint32_t volatile*)(0x38E00274))) +#define VIC0VECTPRIORITY30 (*((uint32_t volatile*)(0x38E00278))) +#define VIC0VECTPRIORITY31 (*((uint32_t volatile*)(0x38E0027C))) +#define VIC0ADDRESS (*((void* volatile*)(0x38E00F00))) +#define VIC1IRQSTATUS (*((uint32_t volatile*)(0x38E01000))) +#define VIC1FIQSTATUS (*((uint32_t volatile*)(0x38E01004))) +#define VIC1RAWINTR (*((uint32_t volatile*)(0x38E01008))) +#define VIC1INTSELECT (*((uint32_t volatile*)(0x38E0100C))) +#define VIC1INTENABLE (*((uint32_t volatile*)(0x38E01010))) +#define VIC1INTENCLEAR (*((uint32_t volatile*)(0x38E01014))) +#define VIC1SOFTINT (*((uint32_t volatile*)(0x38E01018))) +#define VIC1SOFTINTCLEAR (*((uint32_t volatile*)(0x38E0101C))) +#define VIC1PROTECTION (*((uint32_t volatile*)(0x38E01020))) +#define VIC1SWPRIORITYMASK (*((uint32_t volatile*)(0x38E01024))) +#define VIC1PRIORITYDAISY (*((uint32_t volatile*)(0x38E01028))) +#define VIC1VECTADDR(i) (*((const void* volatile*)(0x38E01100 + 4 * (i)))) +#define VIC1VECTADDR0 (*((const void* volatile*)(0x38E01100))) +#define VIC1VECTADDR1 (*((const void* volatile*)(0x38E01104))) +#define VIC1VECTADDR2 (*((const void* volatile*)(0x38E01108))) +#define VIC1VECTADDR3 (*((const void* volatile*)(0x38E0110C))) +#define VIC1VECTADDR4 (*((const void* volatile*)(0x38E01110))) +#define VIC1VECTADDR5 (*((const void* volatile*)(0x38E01114))) +#define VIC1VECTADDR6 (*((const void* volatile*)(0x38E01118))) +#define VIC1VECTADDR7 (*((const void* volatile*)(0x38E0111C))) +#define VIC1VECTADDR8 (*((const void* volatile*)(0x38E01120))) +#define VIC1VECTADDR9 (*((const void* volatile*)(0x38E01124))) +#define VIC1VECTADDR10 (*((const void* volatile*)(0x38E01128))) +#define VIC1VECTADDR11 (*((const void* volatile*)(0x38E0112C))) +#define VIC1VECTADDR12 (*((const void* volatile*)(0x38E01130))) +#define VIC1VECTADDR13 (*((const void* volatile*)(0x38E01134))) +#define VIC1VECTADDR14 (*((const void* volatile*)(0x38E01138))) +#define VIC1VECTADDR15 (*((const void* volatile*)(0x38E0113C))) +#define VIC1VECTADDR16 (*((const void* volatile*)(0x38E01140))) +#define VIC1VECTADDR17 (*((const void* volatile*)(0x38E01144))) +#define VIC1VECTADDR18 (*((const void* volatile*)(0x38E01148))) +#define VIC1VECTADDR19 (*((const void* volatile*)(0x38E0114C))) +#define VIC1VECTADDR20 (*((const void* volatile*)(0x38E01150))) +#define VIC1VECTADDR21 (*((const void* volatile*)(0x38E01154))) +#define VIC1VECTADDR22 (*((const void* volatile*)(0x38E01158))) +#define VIC1VECTADDR23 (*((const void* volatile*)(0x38E0115C))) +#define VIC1VECTADDR24 (*((const void* volatile*)(0x38E01160))) +#define VIC1VECTADDR25 (*((const void* volatile*)(0x38E01164))) +#define VIC1VECTADDR26 (*((const void* volatile*)(0x38E01168))) +#define VIC1VECTADDR27 (*((const void* volatile*)(0x38E0116C))) +#define VIC1VECTADDR28 (*((const void* volatile*)(0x38E01170))) +#define VIC1VECTADDR29 (*((const void* volatile*)(0x38E01174))) +#define VIC1VECTADDR30 (*((const void* volatile*)(0x38E01178))) +#define VIC1VECTADDR31 (*((const void* volatile*)(0x38E0117C))) +#define VIC1VECTPRIORITY(i) (*((uint32_t volatile*)(0x38E01200 + 4 * (i)))) +#define VIC1VECTPRIORITY0 (*((uint32_t volatile*)(0x38E01200))) +#define VIC1VECTPRIORITY1 (*((uint32_t volatile*)(0x38E01204))) +#define VIC1VECTPRIORITY2 (*((uint32_t volatile*)(0x38E01208))) +#define VIC1VECTPRIORITY3 (*((uint32_t volatile*)(0x38E0120C))) +#define VIC1VECTPRIORITY4 (*((uint32_t volatile*)(0x38E01210))) +#define VIC1VECTPRIORITY5 (*((uint32_t volatile*)(0x38E01214))) +#define VIC1VECTPRIORITY6 (*((uint32_t volatile*)(0x38E01218))) +#define VIC1VECTPRIORITY7 (*((uint32_t volatile*)(0x38E0121C))) +#define VIC1VECTPRIORITY8 (*((uint32_t volatile*)(0x38E01220))) +#define VIC1VECTPRIORITY9 (*((uint32_t volatile*)(0x38E01224))) +#define VIC1VECTPRIORITY10 (*((uint32_t volatile*)(0x38E01228))) +#define VIC1VECTPRIORITY11 (*((uint32_t volatile*)(0x38E0122C))) +#define VIC1VECTPRIORITY12 (*((uint32_t volatile*)(0x38E01230))) +#define VIC1VECTPRIORITY13 (*((uint32_t volatile*)(0x38E01234))) +#define VIC1VECTPRIORITY14 (*((uint32_t volatile*)(0x38E01238))) +#define VIC1VECTPRIORITY15 (*((uint32_t volatile*)(0x38E0123C))) +#define VIC1VECTPRIORITY16 (*((uint32_t volatile*)(0x38E01240))) +#define VIC1VECTPRIORITY17 (*((uint32_t volatile*)(0x38E01244))) +#define VIC1VECTPRIORITY18 (*((uint32_t volatile*)(0x38E01248))) +#define VIC1VECTPRIORITY19 (*((uint32_t volatile*)(0x38E0124C))) +#define VIC1VECTPRIORITY20 (*((uint32_t volatile*)(0x38E01250))) +#define VIC1VECTPRIORITY21 (*((uint32_t volatile*)(0x38E01254))) +#define VIC1VECTPRIORITY22 (*((uint32_t volatile*)(0x38E01258))) +#define VIC1VECTPRIORITY23 (*((uint32_t volatile*)(0x38E0125C))) +#define VIC1VECTPRIORITY24 (*((uint32_t volatile*)(0x38E01260))) +#define VIC1VECTPRIORITY25 (*((uint32_t volatile*)(0x38E01264))) +#define VIC1VECTPRIORITY26 (*((uint32_t volatile*)(0x38E01268))) +#define VIC1VECTPRIORITY27 (*((uint32_t volatile*)(0x38E0126C))) +#define VIC1VECTPRIORITY28 (*((uint32_t volatile*)(0x38E01270))) +#define VIC1VECTPRIORITY29 (*((uint32_t volatile*)(0x38E01274))) +#define VIC1VECTPRIORITY30 (*((uint32_t volatile*)(0x38E01278))) +#define VIC1VECTPRIORITY31 (*((uint32_t volatile*)(0x38E0127C))) +#define VIC1ADDRESS (*((void* volatile*)(0x38E01F00))) + + +/////GPIO///// +#define PCON(i) (*((uint32_t volatile*)(0x3cf00000 + ((i) << 5)))) +#define PDAT(i) (*((uint32_t volatile*)(0x3cf00004 + ((i) << 5)))) +#define PUNA(i) (*((uint32_t volatile*)(0x3cf00008 + ((i) << 5)))) +#define PUNB(i) (*((uint32_t volatile*)(0x3cf0000c + ((i) << 5)))) +#define PCON0 (*((uint32_t volatile*)(0x3cf00000))) +#define PDAT0 (*((uint32_t volatile*)(0x3cf00004))) +#define PCON1 (*((uint32_t volatile*)(0x3cf00020))) +#define PDAT1 (*((uint32_t volatile*)(0x3cf00024))) +#define PCON2 (*((uint32_t volatile*)(0x3cf00040))) +#define PDAT2 (*((uint32_t volatile*)(0x3cf00044))) +#define PCON3 (*((uint32_t volatile*)(0x3cf00060))) +#define PDAT3 (*((uint32_t volatile*)(0x3cf00064))) +#define PCON4 (*((uint32_t volatile*)(0x3cf00080))) +#define PDAT4 (*((uint32_t volatile*)(0x3cf00084))) +#define PCON5 (*((uint32_t volatile*)(0x3cf000a0))) +#define PDAT5 (*((uint32_t volatile*)(0x3cf000a4))) +#define PCON6 (*((uint32_t volatile*)(0x3cf000c0))) +#define PDAT6 (*((uint32_t volatile*)(0x3cf000c4))) +#define PCON7 (*((uint32_t volatile*)(0x3cf000e0))) +#define PDAT7 (*((uint32_t volatile*)(0x3cf000e4))) +#define PCON8 (*((uint32_t volatile*)(0x3cf00100))) +#define PDAT8 (*((uint32_t volatile*)(0x3cf00104))) +#define PCON9 (*((uint32_t volatile*)(0x3cf00120))) +#define PDAT9 (*((uint32_t volatile*)(0x3cf00124))) +#define PCONA (*((uint32_t volatile*)(0x3cf00140))) +#define PDATA (*((uint32_t volatile*)(0x3cf00144))) +#define PCONB (*((uint32_t volatile*)(0x3cf00160))) +#define PDATB (*((uint32_t volatile*)(0x3cf00164))) +#define PCONC (*((uint32_t volatile*)(0x3cf00180))) +#define PDATC (*((uint32_t volatile*)(0x3cf00184))) +#define PCOND (*((uint32_t volatile*)(0x3cf001a0))) +#define PDATD (*((uint32_t volatile*)(0x3cf001a4))) +#define PCONE (*((uint32_t volatile*)(0x3cf001c0))) +#define PDATE (*((uint32_t volatile*)(0x3cf001c4))) +#define PCONF (*((uint32_t volatile*)(0x3cf001e0))) +#define PDATF (*((uint32_t volatile*)(0x3cf001e4))) +#define GPIOCMD (*((uint32_t volatile*)(0x3cf00200))) + + +/////SPI///// +#define SPIBASE(i) ((i) == 2 ? 0x3d200000 : \ + (i) == 1 ? 0x3ce00000 : \ + 0x3c300000) +#define SPICLKGATE(i) ((i) == 2 ? 0x2f : \ + (i) == 1 ? 0x2b : \ + 0x22) +#define SPIDMA(i) ((i) == 2 ? 0xd : \ + (i) == 1 ? 0xf : \ + 0x5) +#define SPICTRL(i) (*((uint32_t volatile*)(SPIBASE(i)))) +#define SPISETUP(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x4))) +#define SPISTATUS(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x8))) +#define SPIUNKREG1(i) (*((uint32_t volatile*)(SPIBASE(i) + 0xc))) +#define SPITXDATA(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x10))) +#define SPIRXDATA(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x20))) +#define SPICLKDIV(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x30))) +#define SPIRXLIMIT(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x34))) +#define SPIUNKREG3(i) (*((uint32_t volatile*)(SPIBASE(i) + 0x38))) + + +/////AES///// +#define AESCONTROL (*((uint32_t volatile*)(0x38c00000))) +#define AESGO (*((uint32_t volatile*)(0x38c00004))) +#define AESUNKREG0 (*((uint32_t volatile*)(0x38c00008))) +#define AESSTATUS (*((uint32_t volatile*)(0x38c0000c))) +#define AESUNKREG1 (*((uint32_t volatile*)(0x38c00010))) +#define AESKEYLEN (*((uint32_t volatile*)(0x38c00014))) +#define AESOUTSIZE (*((uint32_t volatile*)(0x38c00018))) +#define AESOUTADDR (*((void* volatile*)(0x38c00020))) +#define AESINSIZE (*((uint32_t volatile*)(0x38c00024))) +#define AESINADDR (*((const void* volatile*)(0x38c00028))) +#define AESAUXSIZE (*((uint32_t volatile*)(0x38c0002c))) +#define AESAUXADDR (*((void* volatile*)(0x38c00030))) +#define AESSIZE3 (*((uint32_t volatile*)(0x38c00034))) +#define AESKEY ((uint32_t volatile*)(0x38c0004c)) +#define AESTYPE (*((uint32_t volatile*)(0x38c0006c))) +#define AESIV ((uint32_t volatile*)(0x38c00074)) +#define AESTYPE2 (*((uint32_t volatile*)(0x38c00088))) +#define AESUNKREG2 (*((uint32_t volatile*)(0x38c0008c))) + + +/////SHA1///// +#define SHA1CONFIG (*((uint32_t volatile*)(0x38000000))) +#define SHA1RESET (*((uint32_t volatile*)(0x38000004))) +#define SHA1RESULT ((uint32_t volatile*)(0x38000020)) +#define SHA1DATAIN ((uint32_t volatile*)(0x38000040)) + + +/////DMA///// +#ifndef ASM +struct dma_lli +{ + const void* srcaddr; + void* dstaddr; + const struct dma_lli* nextlli; + uint32_t control; +}; +#endif +#define DMACINTSTS(d) (*((uint32_t volatile*)(0x38200000 + 0x1700000 * (d)))) +#define DMACINTTCSTS(d) (*((uint32_t volatile*)(0x38200004 + 0x1700000 * (d)))) +#define DMACINTTCCLR(d) (*((uint32_t volatile*)(0x38200008 + 0x1700000 * (d)))) +#define DMACINTERRSTS(d) (*((uint32_t volatile*)(0x3820000c + 0x1700000 * (d)))) +#define DMACINTERRCLR(d) (*((uint32_t volatile*)(0x38200010 + 0x1700000 * (d)))) +#define DMACRAWINTTCSTS(d) (*((uint32_t volatile*)(0x38200014 + 0x1700000 * (d)))) +#define DMACRAWINTERRSTS(d) (*((uint32_t volatile*)(0x38200018 + 0x1700000 * (d)))) +#define DMACENABLEDCHANS(d) (*((uint32_t volatile*)(0x3820001c + 0x1700000 * (d)))) +#define DMACSOFTBREQ(d) (*((uint32_t volatile*)(0x38200020 + 0x1700000 * (d)))) +#define DMACSOFTSREQ(d) (*((uint32_t volatile*)(0x38200024 + 0x1700000 * (d)))) +#define DMACSOFTLBREQ(d) (*((uint32_t volatile*)(0x38200028 + 0x1700000 * (d)))) +#define DMACSOFTLSREQ(d) (*((uint32_t volatile*)(0x3820002c + 0x1700000 * (d)))) +#define DMACCONFIG(d) (*((uint32_t volatile*)(0x38200030 + 0x1700000 * (d)))) +#define DMACSYNC(d) (*((uint32_t volatile*)(0x38200034 + 0x1700000 * (d)))) +#define DMACCLLI(d, c) (*((struct dma_lli volatile*)(0x38200100 + 0x1700000 * (d) + 0x20 * (c)))) +#define DMACCSRCADDR(d, c) (*((const void* volatile*)(0x38200100 + 0x1700000 * (d) + 0x20 * (c)))) +#define DMACCDESTADDR(d, c) (*((void* volatile*)(0x38200104 + 0x1700000 * (d) + 0x20 * (c)))) +#define DMACCNEXTLLI(d, c) (*((const void* volatile*)(0x38200108 + 0x1700000 * (d) + 0x20 * (c)))) +#define DMACCCONTROL(d, c) (*((uint32_t volatile*)(0x3820010c + 0x1700000 * (d) + 0x20 * (c)))) +#define DMACCCONFIG(d, c) (*((uint32_t volatile*)(0x38200110 + 0x1700000 * (d) + 0x20 * (c)))) +#define DMAC0INTSTS (*((uint32_t volatile*)(0x38200000))) +#define DMAC0INTTCSTS (*((uint32_t volatile*)(0x38200004))) +#define DMAC0INTTCCLR (*((uint32_t volatile*)(0x38200008))) +#define DMAC0INTERRSTS (*((uint32_t volatile*)(0x3820000c))) +#define DMAC0INTERRCLR (*((uint32_t volatile*)(0x38200010))) +#define DMAC0RAWINTTCSTS (*((uint32_t volatile*)(0x38200014))) +#define DMAC0RAWINTERRSTS (*((uint32_t volatile*)(0x38200018))) +#define DMAC0ENABLEDCHANS (*((uint32_t volatile*)(0x3820001c))) +#define DMAC0SOFTBREQ (*((uint32_t volatile*)(0x38200020))) +#define DMAC0SOFTSREQ (*((uint32_t volatile*)(0x38200024))) +#define DMAC0SOFTLBREQ (*((uint32_t volatile*)(0x38200028))) +#define DMAC0SOFTLSREQ (*((uint32_t volatile*)(0x3820002c))) +#define DMAC0CONFIG (*((uint32_t volatile*)(0x38200030))) +#define DMAC0SYNC (*((uint32_t volatile*)(0x38200034))) +#define DMAC0CLLI(c) (*((struct dma_lli volatile*)(0x38200100 + 0x20 * (c)))) +#define DMAC0CSRCADDR(c) (*((const void* volatile*)(0x38200100 + 0x20 * (c)))) +#define DMAC0CDESTADDR(c) (*((void* volatile*)(0x38200104 + 0x20 * (c)))) +#define DMAC0CNEXTLLI(c) (*((const void* volatile*)(0x38200108 + 0x20 * (c)))) +#define DMAC0CCONTROL(c) (*((uint32_t volatile*)(0x3820010c + 0x20 * (c)))) +#define DMAC0CCONFIG(c) (*((uint32_t volatile*)(0x38200110 + 0x20 * (c)))) +#define DMAC0C0LLI (*((struct dma_lli volatile*)(0x38200100))) +#define DMAC0C0SRCADDR (*((const void* volatile*)(0x38200100))) +#define DMAC0C0DESTADDR (*((void* volatile*)(0x38200104))) +#define DMAC0C0NEXTLLI (*((const struct dma_lli* volatile*)(0x38200108))) +#define DMAC0C0CONTROL (*((uint32_t volatile*)(0x3820010c))) +#define DMAC0C0CONFIG (*((uint32_t volatile*)(0x38200110))) +#define DMAC0C1LLI (*((struct dma_lli volatile*)(0x38200120))) +#define DMAC0C1SRCADDR (*((const void* volatile*)(0x38200120))) +#define DMAC0C1DESTADDR (*((void* volatile*)(0x38200124))) +#define DMAC0C1NEXTLLI (*((const struct dma_lli* volatile*)(0x38200128))) +#define DMAC0C1CONTROL (*((uint32_t volatile*)(0x3820012c))) +#define DMAC0C1CONFIG (*((uint32_t volatile*)(0x38200130))) +#define DMAC0C2LLI (*((struct dma_lli volatile*)(0x38200140))) +#define DMAC0C2SRCADDR (*((const void* volatile*)(0x38200140))) +#define DMAC0C2DESTADDR (*((void* volatile*)(0x38200144))) +#define DMAC0C2NEXTLLI (*((const struct dma_lli* volatile*)(0x38200148))) +#define DMAC0C2CONTROL (*((uint32_t volatile*)(0x3820014c))) +#define DMAC0C2CONFIG (*((uint32_t volatile*)(0x38200150))) +#define DMAC0C3LLI (*((struct dma_lli volatile*)(0x38200160))) +#define DMAC0C3SRCADDR (*((const void* volatile*)(0x38200160))) +#define DMAC0C3DESTADDR (*((void* volatile*)(0x38200164))) +#define DMAC0C3NEXTLLI (*((const struct dma_lli* volatile*)(0x38200168))) +#define DMAC0C3CONTROL (*((uint32_t volatile*)(0x3820016c))) +#define DMAC0C3CONFIG (*((uint32_t volatile*)(0x38200170))) +#define DMAC0C4LLI (*((struct dma_lli volatile*)(0x38200180))) +#define DMAC0C4SRCADDR (*((const void* volatile*)(0x38200180))) +#define DMAC0C4DESTADDR (*((void* volatile*)(0x38200184))) +#define DMAC0C4NEXTLLI (*((const struct dma_lli* volatile*)(0x38200188))) +#define DMAC0C4CONTROL (*((uint32_t volatile*)(0x3820018c))) +#define DMAC0C4CONFIG (*((uint32_t volatile*)(0x38200190))) +#define DMAC0C5LLI (*((struct dma_lli volatile*)(0x382001a0))) +#define DMAC0C5SRCADDR (*((const void* volatile*)(0x382001a0))) +#define DMAC0C5DESTADDR (*((void* volatile*)(0x382001a4))) +#define DMAC0C5NEXTLLI (*((const struct dma_lli* volatile*)(0x382001a8))) +#define DMAC0C5CONTROL (*((uint32_t volatile*)(0x382001ac))) +#define DMAC0C5CONFIG (*((uint32_t volatile*)(0x382001b0))) +#define DMAC0C6LLI (*((struct dma_lli volatile*)(0x382001c0))) +#define DMAC0C6SRCADDR (*((const void* volatile*)(0x382001c0))) +#define DMAC0C6DESTADDR (*((void* volatile*)(0x382001c4))) +#define DMAC0C6NEXTLLI (*((const struct dma_lli* volatile*)(0x382001c8))) +#define DMAC0C6CONTROL (*((uint32_t volatile*)(0x382001cc))) +#define DMAC0C6CONFIG (*((uint32_t volatile*)(0x382001d0))) +#define DMAC0C7LLI (*((struct dma_lli volatile*)(0x382001e0))) +#define DMAC0C7SRCADDR (*((const void* volatile*)(0x382001e0))) +#define DMAC0C7DESTADDR (*((void* volatile*)(0x382001e4))) +#define DMAC0C7NEXTLLI (*((const struct dma_lli* volatile*)(0x382001e8))) +#define DMAC0C7CONTROL (*((uint32_t volatile*)(0x382001ec))) +#define DMAC0C7CONFIG (*((uint32_t volatile*)(0x382001f0))) +#define DMAC1INTSTS (*((uint32_t volatile*)(0x39900000))) +#define DMAC1INTTCSTS (*((uint32_t volatile*)(0x39900004))) +#define DMAC1INTTCCLR (*((uint32_t volatile*)(0x39900008))) +#define DMAC1INTERRSTS (*((uint32_t volatile*)(0x3990000c))) +#define DMAC1INTERRCLR (*((uint32_t volatile*)(0x39900010))) +#define DMAC1RAWINTTCSTS (*((uint32_t volatile*)(0x39900014))) +#define DMAC1RAWINTERRSTS (*((uint32_t volatile*)(0x39900018))) +#define DMAC1ENABLEDCHANS (*((uint32_t volatile*)(0x3990001c))) +#define DMAC1SOFTBREQ (*((uint32_t volatile*)(0x39900020))) +#define DMAC1SOFTSREQ (*((uint32_t volatile*)(0x39900024))) +#define DMAC1SOFTLBREQ (*((uint32_t volatile*)(0x39900028))) +#define DMAC1SOFTLSREQ (*((uint32_t volatile*)(0x3990002c))) +#define DMAC1CONFIG (*((uint32_t volatile*)(0x39900030))) +#define DMAC1SYNC (*((uint32_t volatile*)(0x39900034))) +#define DMAC1CLLI(c) (*((struct dma_lli volatile*)(0x39900100 + 0x20 * (c)))) +#define DMAC1CSRCADDR(c) (*((const void* volatile*)(0x39900100 + 0x20 * (c)))) +#define DMAC1CDESTADDR(c) (*((void* volatile*)(0x39900104 + 0x20 * (c)))) +#define DMAC1CNEXTLLI(c) (*((const void* volatile*)(0x39900108 + 0x20 * (c)))) +#define DMAC1CCONTROL(c) (*((uint32_t volatile*)(0x3990010c + 0x20 * (c)))) +#define DMAC1CCONFIG(c) (*((uint32_t volatile*)(0x39900110 + 0x20 * (c)))) +#define DMAC1C0LLI (*((struct dma_lli volatile*)(0x39900100))) +#define DMAC1C0SRCADDR (*((const void* volatile*)(0x39900100))) +#define DMAC1C0DESTADDR (*((void* volatile*)(0x39900104))) +#define DMAC1C0NEXTLLI (*((const struct dma_lli* volatile*)(0x39900108))) +#define DMAC1C0CONTROL (*((uint32_t volatile*)(0x3990010c))) +#define DMAC1C0CONFIG (*((uint32_t volatile*)(0x39900110))) +#define DMAC1C1LLI (*((struct dma_lli volatile*)(0x39900120))) +#define DMAC1C1SRCADDR (*((const void* volatile*)(0x39900120))) +#define DMAC1C1DESTADDR (*((void* volatile*)(0x39900124))) +#define DMAC1C1NEXTLLI (*((const struct dma_lli* volatile*)(0x39900128))) +#define DMAC1C1CONTROL (*((uint32_t volatile*)(0x3990012c))) +#define DMAC1C1CONFIG (*((uint32_t volatile*)(0x39900130))) +#define DMAC1C2LLI (*((struct dma_lli volatile*)(0x39900140))) +#define DMAC1C2SRCADDR (*((const void* volatile*)(0x39900140))) +#define DMAC1C2DESTADDR (*((void* volatile*)(0x39900144))) +#define DMAC1C2NEXTLLI (*((const struct dma_lli* volatile*)(0x39900148))) +#define DMAC1C2CONTROL (*((uint32_t volatile*)(0x3990014c))) +#define DMAC1C2CONFIG (*((uint32_t volatile*)(0x39900150))) +#define DMAC1C3LLI (*((struct dma_lli volatile*)(0x39900160))) +#define DMAC1C3SRCADDR (*((const void* volatile*)(0x39900160))) +#define DMAC1C3DESTADDR (*((void* volatile*)(0x39900164))) +#define DMAC1C3NEXTLLI (*((volatile void**)(0x39900168))) +#define DMAC1C3CONTROL (*((uint32_t volatile*)(0x3990016c))) +#define DMAC1C3CONFIG (*((uint32_t volatile*)(0x39900170))) +#define DMAC1C4LLI (*((struct dma_lli volatile*)(0x39900180))) +#define DMAC1C4SRCADDR (*((const void* volatile*)(0x39900180))) +#define DMAC1C4DESTADDR (*((void* volatile*)(0x39900184))) +#define DMAC1C4NEXTLLI (*((const struct dma_lli* volatile*)(0x39900188))) +#define DMAC1C4CONTROL (*((uint32_t volatile*)(0x3990018c))) +#define DMAC1C4CONFIG (*((uint32_t volatile*)(0x39900190))) +#define DMAC1C5LLI (*((struct dma_lli volatile*)(0x399001a0))) +#define DMAC1C5SRCADDR (*((const void* volatile*)(0x399001a0))) +#define DMAC1C5DESTADDR (*((void* volatile*)(0x399001a4))) +#define DMAC1C5NEXTLLI (*((const struct dma_lli* volatile*)(0x399001a8))) +#define DMAC1C5CONTROL (*((uint32_t volatile*)(0x399001ac))) +#define DMAC1C5CONFIG (*((uint32_t volatile*)(0x399001b0))) +#define DMAC1C6LLI (*((struct dma_lli volatile*)(0x399001c0))) +#define DMAC1C6SRCADDR (*((const void* volatile*)(0x399001c0))) +#define DMAC1C6DESTADDR (*((void* volatile*)(0x399001c4))) +#define DMAC1C6NEXTLLI (*((const struct dma_lli* volatile*)(0x399001c8))) +#define DMAC1C6CONTROL (*((uint32_t volatile*)(0x399001cc))) +#define DMAC1C6CONFIG (*((uint32_t volatile*)(0x399001d0))) +#define DMAC1C7LLI (*((struct dma_lli volatile*)(0x399001e0))) +#define DMAC1C7SRCADDR (*((const void* volatile*)(0x399001e0))) +#define DMAC1C7DESTADDR (*((void* volatile*)(0x399001e4))) +#define DMAC1C7NEXTLLI (*((const struct dma_lli* volatile*)(0x399001e8))) +#define DMAC1C7CONTROL (*((uint32_t volatile*)(0x399001ec))) +#define DMAC1C7CONFIG (*((uint32_t volatile*)(0x399001f0))) + + +/////LCD///// +#define LCD_BASE (0x38300000) +#define LCD_CONFIG (*((uint32_t volatile*)(0x38300000))) +#define LCD_WCMD (*((uint32_t volatile*)(0x38300004))) +#define LCD_STATUS (*((uint32_t volatile*)(0x3830001c))) +#define LCD_WDATA (*((uint32_t volatile*)(0x38300040))) + + +/////ATA///// +#define ATA_CONTROL (*((uint32_t volatile*)(0x38700000))) +#define ATA_STATUS (*((uint32_t volatile*)(0x38700004))) +#define ATA_COMMAND (*((uint32_t volatile*)(0x38700008))) +#define ATA_SWRST (*((uint32_t volatile*)(0x3870000c))) +#define ATA_IRQ (*((uint32_t volatile*)(0x38700010))) +#define ATA_IRQ_MASK (*((uint32_t volatile*)(0x38700014))) +#define ATA_CFG (*((uint32_t volatile*)(0x38700018))) +#define ATA_MDMA_TIME (*((uint32_t volatile*)(0x38700028))) +#define ATA_PIO_TIME (*((uint32_t volatile*)(0x3870002c))) +#define ATA_UDMA_TIME (*((uint32_t volatile*)(0x38700030))) +#define ATA_XFR_NUM (*((uint32_t volatile*)(0x38700034))) +#define ATA_XFR_CNT (*((uint32_t volatile*)(0x38700038))) +#define ATA_TBUF_START (*((void* volatile*)(0x3870003c))) +#define ATA_TBUF_SIZE (*((uint32_t volatile*)(0x38700040))) +#define ATA_SBUF_START (*((void* volatile*)(0x38700044))) +#define ATA_SBUF_SIZE (*((uint32_t volatile*)(0x38700048))) +#define ATA_CADR_TBUF (*((void* volatile*)(0x3870004c))) +#define ATA_CADR_SBUF (*((void* volatile*)(0x38700050))) +#define ATA_PIO_DTR (*((uint32_t volatile*)(0x38700054))) +#define ATA_PIO_FED (*((uint32_t volatile*)(0x38700058))) +#define ATA_PIO_SCR (*((uint32_t volatile*)(0x3870005c))) +#define ATA_PIO_LLR (*((uint32_t volatile*)(0x38700060))) +#define ATA_PIO_LMR (*((uint32_t volatile*)(0x38700064))) +#define ATA_PIO_LHR (*((uint32_t volatile*)(0x38700068))) +#define ATA_PIO_DVR (*((uint32_t volatile*)(0x3870006c))) +#define ATA_PIO_CSD (*((uint32_t volatile*)(0x38700070))) +#define ATA_PIO_DAD (*((uint32_t volatile*)(0x38700074))) +#define ATA_PIO_READY (*((uint32_t volatile*)(0x38700078))) +#define ATA_PIO_RDATA (*((uint32_t volatile*)(0x3870007c))) +#define ATA_BUS_FIFO_STATUS (*((uint32_t volatile*)(0x38700080))) +#define ATA_FIFO_STATUS (*((uint32_t volatile*)(0x38700084))) +#define ATA_DMA_ADDR (*((void* volatile*)(0x38700088))) + + +/////SDCI///// +#define SDCI_CTRL (*((uint32_t volatile*)(0x38b00000))) +#define SDCI_DCTRL (*((uint32_t volatile*)(0x38b00004))) +#define SDCI_CMD (*((uint32_t volatile*)(0x38b00008))) +#define SDCI_ARGU (*((uint32_t volatile*)(0x38b0000c))) +#define SDCI_STATE (*((uint32_t volatile*)(0x38b00010))) +#define SDCI_STAC (*((uint32_t volatile*)(0x38b00014))) +#define SDCI_DSTA (*((uint32_t volatile*)(0x38b00018))) +#define SDCI_FSTA (*((uint32_t volatile*)(0x38b0001c))) +#define SDCI_RESP0 (*((uint32_t volatile*)(0x38b00020))) +#define SDCI_RESP1 (*((uint32_t volatile*)(0x38b00024))) +#define SDCI_RESP2 (*((uint32_t volatile*)(0x38b00028))) +#define SDCI_RESP3 (*((uint32_t volatile*)(0x38b0002c))) +#define SDCI_CDIV (*((uint32_t volatile*)(0x38b00030))) +#define SDCI_SDIO_CSR (*((uint32_t volatile*)(0x38b00034))) +#define SDCI_IRQ (*((uint32_t volatile*)(0x38b00038))) +#define SDCI_IRQ_MASK (*((uint32_t volatile*)(0x38b0003c))) +#define SDCI_DATA (*((uint32_t volatile*)(0x38b00040))) +#define SDCI_DMAADDR (*((void* volatile*)(0x38b00044))) +#define SDCI_DMASIZE (*((uint32_t volatile*)(0x38b00048))) +#define SDCI_DMACOUNT (*((uint32_t volatile*)(0x38b0004c))) +#define SDCI_RESET (*((uint32_t volatile*)(0x38b0006c))) + +#define SDCI_CTRL_SDCIEN BIT(0) +#define SDCI_CTRL_CARD_TYPE_MASK BIT(1) +#define SDCI_CTRL_CARD_TYPE_SD 0 +#define SDCI_CTRL_CARD_TYPE_MMC BIT(1) +#define SDCI_CTRL_BUS_WIDTH_MASK BITRANGE(2, 3) +#define SDCI_CTRL_BUS_WIDTH_1BIT 0 +#define SDCI_CTRL_BUS_WIDTH_4BIT BIT(2) +#define SDCI_CTRL_BUS_WIDTH_8BIT BIT(3) +#define SDCI_CTRL_DMA_EN BIT(4) +#define SDCI_CTRL_L_ENDIAN BIT(5) +#define SDCI_CTRL_DMA_REQ_CON_MASK BIT(6) +#define SDCI_CTRL_DMA_REQ_CON_NEMPTY 0 +#define SDCI_CTRL_DMA_REQ_CON_FULL BIT(6) +#define SDCI_CTRL_CLK_SEL_MASK BIT(7) +#define SDCI_CTRL_CLK_SEL_PCLK 0 +#define SDCI_CTRL_CLK_SEL_SDCLK BIT(7) +#define SDCI_CTRL_BIT_8 BIT(8) +#define SDCI_CTRL_BIT_14 BIT(14) + +#define SDCI_DCTRL_TXFIFORST BIT(0) +#define SDCI_DCTRL_RXFIFORST BIT(1) +#define SDCI_DCTRL_TRCONT_MASK BITRANGE(4, 5) +#define SDCI_DCTRL_TRCONT_TX BIT(4) +#define SDCI_DCTRL_BUS_TEST_MASK BITRANGE(6, 7) +#define SDCI_DCTRL_BUS_TEST_TX BIT(6) +#define SDCI_DCTRL_BUS_TEST_RX BIT(7) + +#define SDCI_CDIV_CLKDIV_MASK BITRANGE(0, 7) +#define SDCI_CDIV_CLKDIV(x) ((x) >> 1) +#define SDCI_CDIV_CLKDIV_2 BIT(0) +#define SDCI_CDIV_CLKDIV_4 BIT(1) +#define SDCI_CDIV_CLKDIV_8 BIT(2) +#define SDCI_CDIV_CLKDIV_16 BIT(3) +#define SDCI_CDIV_CLKDIV_32 BIT(4) +#define SDCI_CDIV_CLKDIV_64 BIT(5) +#define SDCI_CDIV_CLKDIV_128 BIT(6) +#define SDCI_CDIV_CLKDIV_256 BIT(7) + +#define SDCI_CMD_CMD_NUM_MASK BITRANGE(0, 5) +#define SDCI_CMD_CMD_NUM_SHIFT 0 +#define SDCI_CMD_CMD_NUM(x) (x) +#define SDCI_CMD_CMD_TYPE_MASK BITRANGE(6, 7) +#define SDCI_CMD_CMD_TYPE_BC 0 +#define SDCI_CMD_CMD_TYPE_BCR BIT(6) +#define SDCI_CMD_CMD_TYPE_AC BIT(7) +#define SDCI_CMD_CMD_TYPE_ADTC (BIT(6) | BIT(7)) +#define SDCI_CMD_CMD_RD_WR BIT(8) +#define SDCI_CMD_RES_TYPE_MASK BITRANGE(16, 18) +#define SDCI_CMD_RES_TYPE_NONE 0 +#define SDCI_CMD_RES_TYPE_R1 BIT(16) +#define SDCI_CMD_RES_TYPE_R2 BIT(17) +#define SDCI_CMD_RES_TYPE_R3 (BIT(16) | BIT(17)) +#define SDCI_CMD_RES_TYPE_R4 BIT(18) +#define SDCI_CMD_RES_TYPE_R5 (BIT(16) | BIT(18)) +#define SDCI_CMD_RES_TYPE_R6 (BIT(17) | BIT(18)) +#define SDCI_CMD_RES_BUSY BIT(19) +#define SDCI_CMD_RES_SIZE_MASK BIT(20) +#define SDCI_CMD_RES_SIZE_48 0 +#define SDCI_CMD_RES_SIZE_136 BIT(20) +#define SDCI_CMD_NCR_NID_MASK BIT(21) +#define SDCI_CMD_NCR_NID_NCR 0 +#define SDCI_CMD_NCR_NID_NID BIT(21) +#define SDCI_CMD_CMDSTR BIT(31) + +#define SDCI_STATE_DAT_STATE_MASK BITRANGE(0, 3) +#define SDCI_STATE_DAT_STATE_IDLE 0 +#define SDCI_STATE_DAT_STATE_DAT_RCV BIT(0) +#define SDCI_STATE_DAT_STATE_CRC_RCV BIT(1) +#define SDCI_STATE_DAT_STATE_DAT_END (BIT(0) | BIT(1)) +#define SDCI_STATE_DAT_STATE_DAT_SET BIT(2) +#define SDCI_STATE_DAT_STATE_DAT_OUT (BIT(0) | BIT(2)) +#define SDCI_STATE_DAT_STATE_CRC_TIME (BIT(1) | BIT(2)) +#define SDCI_STATE_DAT_STATE_CRC_OUT (BIT(0) | BIT(1) | BIT(2)) +#define SDCI_STATE_DAT_STATE_ENDB_OUT BIT(3) +#define SDCI_STATE_DAT_STATE_ENDB_STOD (BIT(0) | BIT(3)) +#define SDCI_STATE_DAT_STATE_DAT_CRCR (BIT(1) | BIT(3)) +#define SDCI_STATE_DAT_STATE_CARD_PRG (BIT(0) | BIT(1) | BIT(3)) +#define SDCI_STATE_DAT_STATE_DAT_BUSY (BIT(2) | BIT(3)) +#define SDCI_STATE_CMD_STATE_MASK (BIT(4) | BIT(5) | BIT(6)) +#define SDCI_STATE_CMD_STATE_CMD_IDLE 0 +#define SDCI_STATE_CMD_STATE_CMD_CMDO BIT(4) +#define SDCI_STATE_CMD_STATE_CMD_CRCO BIT(5) +#define SDCI_STATE_CMD_STATE_CMD_TOUT (BIT(4) | BIT(5)) +#define SDCI_STATE_CMD_STATE_CMD_RESR BIT(6) +#define SDCI_STATE_CMD_STATE_CMD_INTV (BIT(4) | BIT(6)) + +#define SDCI_STAC_CLR_CMDEND BIT(2) +#define SDCI_STAC_CLR_BIT_3 BIT(3) +#define SDCI_STAC_CLR_RESEND BIT(4) +#define SDCI_STAC_CLR_DATEND BIT(6) +#define SDCI_STAC_CLR_DAT_CRCEND BIT(7) +#define SDCI_STAC_CLR_CRC_STAEND BIT(8) +#define SDCI_STAC_CLR_RESTOUTE BIT(15) +#define SDCI_STAC_CLR_RESENDE BIT(16) +#define SDCI_STAC_CLR_RESINDE BIT(17) +#define SDCI_STAC_CLR_RESCRCE BIT(18) +#define SDCI_STAC_CLR_WR_DATCRCE BIT(22) +#define SDCI_STAC_CLR_RD_DATCRCE BIT(23) +#define SDCI_STAC_CLR_RD_DATENDE0 BIT(24) +#define SDCI_STAC_CLR_RD_DATENDE1 BIT(25) +#define SDCI_STAC_CLR_RD_DATENDE2 BIT(26) +#define SDCI_STAC_CLR_RD_DATENDE3 BIT(27) +#define SDCI_STAC_CLR_RD_DATENDE4 BIT(28) +#define SDCI_STAC_CLR_RD_DATENDE5 BIT(29) +#define SDCI_STAC_CLR_RD_DATENDE6 BIT(30) +#define SDCI_STAC_CLR_RD_DATENDE7 BIT(31) + +#define SDCI_DSTA_CMDRDY BIT(0) +#define SDCI_DSTA_CMDPRO BIT(1) +#define SDCI_DSTA_CMDEND BIT(2) +#define SDCI_DSTA_RESPRO BIT(3) +#define SDCI_DSTA_RESEND BIT(4) +#define SDCI_DSTA_DATPRO BIT(5) +#define SDCI_DSTA_DATEND BIT(6) +#define SDCI_DSTA_DAT_CRCEND BIT(7) +#define SDCI_DSTA_CRC_STAEND BIT(8) +#define SDCI_DSTA_DAT_BUSY BIT(9) +#define SDCI_DSTA_SDCLK_HOLD BIT(12) +#define SDCI_DSTA_DAT0_STATUS BIT(13) +#define SDCI_DSTA_WP_DECT_INPUT BIT(14) +#define SDCI_DSTA_RESTOUTE BIT(15) +#define SDCI_DSTA_RESENDE BIT(16) +#define SDCI_DSTA_RESINDE BIT(17) +#define SDCI_DSTA_RESCRCE BIT(18) +#define SDCI_DSTA_WR_CRC_STATUS_MASK BITRANGE(19, 21) +#define SDCI_DSTA_WR_CRC_STATUS_OK BIT(20) +#define SDCI_DSTA_WR_CRC_STATUS_TXERR (BIT(19) | BIT(21)) +#define SDCI_DSTA_WR_CRC_STATUS_CARDERR (BIT(19) | BIT(20) | BIT(21)) +#define SDCI_DSTA_WR_DATCRCE BIT(22) +#define SDCI_DSTA_RD_DATCRCE BIT(23) +#define SDCI_DSTA_RD_DATENDE0 BIT(24) +#define SDCI_DSTA_RD_DATENDE1 BIT(25) +#define SDCI_DSTA_RD_DATENDE2 BIT(26) +#define SDCI_DSTA_RD_DATENDE3 BIT(27) +#define SDCI_DSTA_RD_DATENDE4 BIT(28) +#define SDCI_DSTA_RD_DATENDE5 BIT(29) +#define SDCI_DSTA_RD_DATENDE6 BIT(30) +#define SDCI_DSTA_RD_DATENDE7 BIT(31) + +#define SDCI_FSTA_RX_FIFO_EMPTY BIT(0) +#define SDCI_FSTA_RX_FIFO_FULL BIT(1) +#define SDCI_FSTA_TX_FIFO_EMPTY BIT(2) +#define SDCI_FSTA_TX_FIFO_FULL BIT(3) + +#define SDCI_SDIO_CSR_SDIO_RW_EN BIT(0) +#define SDCI_SDIO_CSR_SDIO_INT_EN BIT(1) +#define SDCI_SDIO_CSR_SDIO_RW_REQ BIT(2) +#define SDCI_SDIO_CSR_SDIO_RW_STOP BIT(3) +#define SDCI_SDIO_CSR_SDIO_INT_PERIOD_MASK BIT(4) +#define SDCI_SDIO_CSR_SDIO_INT_PERIOD_MORE 0 +#define SDCI_SDIO_CSR_SDIO_INT_PERIOD_XACT BIT(4) + +#define SDCI_IRQ_DAT_DONE_INT BIT(0) +#define SDCI_IRQ_IOCARD_IRQ_INT BIT(1) +#define SDCI_IRQ_READ_WAIT_INT BIT(2) + +#define SDCI_IRQ_MASK_MASK_DAT_DONE_INT BIT(0) +#define SDCI_IRQ_MASK_MASK_IOCARD_IRQ_INT BIT(1) +#define SDCI_IRQ_MASK_MASK_READ_WAIT_INT BIT(2) + + +/////CLICKWHEEL///// +#define WHEEL00 (*((uint32_t volatile*)(0x3C200000))) +#define WHEEL04 (*((uint32_t volatile*)(0x3C200004))) +#define WHEEL08 (*((uint32_t volatile*)(0x3C200008))) +#define WHEEL0C (*((uint32_t volatile*)(0x3C20000C))) +#define WHEEL10 (*((uint32_t volatile*)(0x3C200010))) +#define WHEELINT (*((uint32_t volatile*)(0x3C200014))) +#define WHEELRX (*((uint32_t volatile*)(0x3C200018))) +#define WHEELTX (*((uint32_t volatile*)(0x3C20001C))) + + +/////I2S///// +#define I2SCLKCON (*((volatile uint32_t*)(0x3CA00000))) +#define I2STXCON (*((volatile uint32_t*)(0x3CA00004))) +#define I2STXCOM (*((volatile uint32_t*)(0x3CA00008))) +#define I2STXDB0 (*((volatile uint32_t*)(0x3CA00010))) +#define I2SRXCON (*((volatile uint32_t*)(0x3CA00030))) +#define I2SRXCOM (*((volatile uint32_t*)(0x3CA00034))) +#define I2SRXDB (*((volatile uint32_t*)(0x3CA00038))) +#define I2SSTATUS (*((volatile uint32_t*)(0x3CA0003C))) +#define I2S40 (*((volatile uint32_t*)(0x3CA00040))) + + +/////CLOCK GATES///// +#define CLOCKGATE_USB_1 2 +#define CLOCKGATE_USB_2 35 + + +/////INTERRUPTS///// +#define IRQ_TIMER 8 +#define IRQ_USB_FUNC 19 +#define IRQ_DMAC(d) 16 + d +#define IRQ_DMAC0 16 +#define IRQ_DMAC1 17 +#define IRQ_WHEEL 23 +#define IRQ_ATA 29 +#define IRQ_MMC 44 + + +#endif + diff --git a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c index 4650913..2d8d25c 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c +++ b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: lcd-clipzip.c 30465 2011-09-06 16:55:52Z bertrik $ + * $Id$ * * Copyright (C) 2011 Bertrik Sikken * diff --git a/firmware/target/arm/s5l8700/postmortemstub.S b/firmware/target/arm/s5l8700/postmortemstub.S index 73f192a..d0874c4 100644 --- a/firmware/target/arm/s5l8700/postmortemstub.S +++ b/firmware/target/arm/s5l8700/postmortemstub.S @@ -1,308 +1,308 @@ -.section .text.post_mortem_stub, "ax", %progbits
-.align 4
-.global post_mortem_stub
-.type post_mortem_stub, %function
-post_mortem_stub:
-MSR CPSR_c, #0xD3 @ Supervisor mode, no IRQs, no FIQs
-MRC p15, 0, R0,c1,c0
-BIC R0, R0, #5
-MCR p15, 0, R0,c1,c0 @ Disable the Protection Unit and DCache
-MOV R13, #0
-pms_flushcache_loop:
- MCR p15, 0, R13,c7,c14,2
- ADD R0, R13, #0x10
- MCR p15, 0, R0,c7,c14,2
- ADD R0, R0, #0x10
- MCR p15, 0, R0,c7,c14,2
- ADD R0, R0, #0x10
- MCR p15, 0, R0,c7,c14,2
- ADDS R13, R13, #0x04000000
-BNE pms_flushcache_loop
-MCR p15, 0, R13,c7,c10,4
-
-LDR R7, pms_00080200
-ORR R8, R7, #0x8000
-ADR R9, pms_recvbuf
-LDR R10, pms_20080040
-MOV R11, #0x38800000
-MOV R12, #1
-
-MOV R2, #0x3C400000
-ADD R1, R2, #0x00100000 @ Enable USB clocks
-LDR R0, [R1,#0x28]
-BIC R0, R0, #0x4000
-STR R0, [R1,#0x28]
-LDR R0, [R1,#0x40]
-BIC R0, R0, #0x800
-STR R0, [R1,#0x40]
-LDR R0, pms_20803180 @ Clocking config
-STR R0, [R1]
-MOV R0, #0x280
-STR R0, [R1,#0x3C]
-MRC p15, 0, R0,c1,c0
-ORR R0, R0, #0xc0000000
-MCR p15, 0, R0,c1,c0 @ Asynchronous mode
-
-STR R13, [R11,#0xE00] @ PHY clock enable
-
-MOV R1, #0x800
-ORR R0, R2, #2
-STR R0, [R11,#0x804] @ USB2 Gadget: Soft disconnect
-
-STR R13, [R2] @ USB2 PHY: Power on
-STR R12, [R2,#0x08] @ USB2 PHY: Assert Software Reset
-MOV R0, #0x10000
-pms_wait:
-SUBS R0, R0, #1
-BNE pms_wait
-STR R13, [R2,#0x08] @ USB2 PHY: Deassert Software Reset
-STR R13, [R2,#0x04] @ USB2 PHY: Clock is 48MHz
-
-STR R12, [R11,#0x10] @ USB2 Gadget: Assert Core Software Reset
-pms_waitcorereset:
-LDR R0, [R11,#0x10] @ USB2 Gadget: Wait for Core to reset
-TST R0, #1
-BNE pms_waitcorereset
-TST R0, #0x80000000 @ USB2 Gadget: Wait for AHB IDLE
-BEQ pms_waitcorereset
-
-MOV R0, #0x200
-STR R0, [R11,#0x24] @ USB2 Gadget: RX FIFO size: 512 bytes
-ORR R0, R0, #0x2000000
-STR R0, [R11,#0x28] @ USB2 Gadget: Non-periodic TX FIFO size: 512 bytes
-MOV R0, #0x26
-STR R0, [R11,#0x08] @ USB2 Gadget: DMA Enable, Burst Length: 4, Mask Interrupts
-MOV R0, #0x1400
-ADD R0, R0, #8
-STR R0, [R11,#0x0C] @ USB2 Gadget: PHY IF is 16bit, Turnaround 5
-STR R1, [R11,#0x804] @ USB2 Gadget: Soft reconnect
-
-ADR R14, pms_ctrlbuf
-ORR R5, R8, #0x84000000
-@ fallthrough
-
-pms_mainloop:
- LDR R3, [R11,#0x14] @ Global USB interrupts
- TST R3, #0x00001000 @ BUS reset
- BEQ pms_noreset
- MOV R0, #0x500
- STR R0, [R11,#0x804]
- MOV R0, #4
- STR R0, [R11,#0x800] @ USB2 Gadget: Device Address 0, STALL on non-zero length status stage
- MOV R0, #0x8000
- STR R0, [R11,#0x900] @ USB2 Gadget: Endpoint 0 IN Control: ACTIVE
- STR R10, [R11,#0xB10] @ USB2 Gadget: Endpoint 0 OUT Transfer Size: 64 Bytes, 1 Packet, 1 Setup Packet
- STR R14, [R11,#0xB14] @ USB2 Gadget: Endpoint 0 OUT DMA Address: pms_ctrlbuf
- ORR R6, R0, #0x84000000
- STR R6, [R11,#0xB00] @ USB2 Gadget: Endpoint 0 OUT Control: ENABLE CLEARNAK
- STR R8, [R11,#0x960] @ USB2 Gadget: Endpoint 3 IN Control: ACTIVE BULK, 512 byte packets
- STR R8, [R11,#0xB80] @ USB2 Gadget: Endpoint 4 OUT Control: ACTIVE BULK, 512 byte packets
- STR R7, [R11,#0xB90] @ USB2 Gadget: Endpoint 4 OUT Transfer Size: 512 Bytes, 1 Packet
- STR R9, [R11,#0xB94] @ USB2 Gadget: Endpoint 4 OUT DMA Address: pms_recvbuf
- ORR R4, R5, #0x10000000
- STR R4, [R11,#0xB80] @ USB2 Gadget: Endpoint 4 OUT Control: ENABLE CLEARNAK DATA0
- pms_noreset:
- LDR R0, [R11,#0x908] @ Just ACK all IN events...
- STR R0, [R11,#0x908]
- LDR R0, [R11,#0x968]
- STR R0, [R11,#0x968]
- LDR R2, [R11,#0xB08]
- MOVS R2, R2 @ Event on OUT EP0
- BEQ pms_noep0out
- TST R2, #8 @ SETUP phase done
- BEQ pms_controldone
- LDRB R0, [R14,#1] @ Get request type
- CMP R0, #0
- BEQ pms_GET_STATUS
- CMP R0, #1
- BEQ pms_CLEAR_FEATURE
- CMP R0, #3
- BEQ pms_SET_FEATURE
- CMP R0, #5
- BEQ pms_SET_ADDRESS
- CMP R0, #6
- BEQ pms_GET_DESCRIPTOR
- CMP R0, #8
- BEQ pms_GET_CONFIGURATION
- CMP R0, #9
- BEQ pms_SET_CONFIGURATION
- pms_ctrlstall:
- LDR R0, [R11,#0x900]
- ORR R0, R0, #0x00200000
- STR R0, [R11,#0x900] @ Stall IN EP0
- LDR R0, [R11,#0xB00]
- ORR R0, R0, #0x00200000
- STR R0, [R11,#0xB00] @ Stall OUT EP0
- pms_controldone:
- STR R10, [R11,#0xB10] @ OUT EP0: 64 Bytes, 1 Packet, 1 Setup Packet
- STR R14, [R11,#0xB14] @ OUT EP0: DMA address
- STR R6, [R11,#0xB00] @ OUT EP0: Enable ClearNAK
- pms_noep0out:
- STR R2, [R11,#0xB08] @ ACK it, whatever it was...
- LDR R2, [R11,#0xB88]
- MOVS R2, R2 @ Event on OUT EP4
- BEQ pms_noep1out
- TST R2, #1 @ XFER complete
- BEQ pms_datadone
- LDR R0, pms_000001FF
- LDR R1, pms_recvbuf+4
- ADD R0, R0, R1
- MOV R0, R0,LSR#9
- ORR R1, R1, R0,LSL#19 @ Number of packets
- LDR R0, pms_recvbuf
- STR R1, [R11,#0x970] @ EP3 IN: Number of packets, size
- STR R0, [R11,#0x974] @ EP3 IN: DMA address
- STR R5, [R11,#0x960] @ EP3 IN: Enable ClearNAK
- pms_datadone:
- STR R7, [R11,#0xB90] @ OUT EP4: 512 Bytes, 1 Packet
- STR R9, [R11,#0xB94] @ Out EP4: DMA address
- STR R5, [R11,#0xB80] @ Out EP4: Enable ClearNAK
- pms_noep1out:
- STR R2, [R11,#0xB88] @ ACK it, whatever it was...
- STR R3, [R11,#0x14] @ ACK global ints
-B pms_mainloop
-
-pms_CLEAR_FEATURE:
- LDRB R0, [R14]
- CMP R0, #2
- LDREQ R0, [R14,#2]
- BICEQ R0, R0, #0x00800000
- CMPEQ R0, #0x00010000
-@ fallthrough
-
-pms_SET_CONFIGURATION:
- ORREQ R0, R8, #0x10000000
- STREQ R0, [R11,#0x960] @ EP3 IN: Set DATA0 PID
- STREQ R4, [R11,#0xB80] @ EP4 OUT: Set DATA0 PID
-B pms_SET_FEATURE @ zero-length ACK
-
-pms_GET_CONFIGURATION:
- MOV R1, #1
- STR R1, [R14]
-@ fallthrough
-
-pms_ctrlsend:
- ORR R0, R1, #0x00080000 @ 1 Packet
- STR R0, [R11,#0x910] @ EP0 IN: 1 Packet, Size as in R1
- STR R14, [R11,#0x914] @ EP0 IN: DMA address
- ORR R0, R6, #0x1800
- STR R0, [R11,#0x900] @ EP0 IN: Enable ClearNAK
- ADR R14, pms_ctrlbuf
-B pms_controldone
-
-pms_GET_DESCRIPTOR:
- LDRB R0, [R14,#3] @ Descriptor type
- CMP R0, #1
- ADREQ R14, pms_devicedescriptor
- BEQ pms_senddescriptor
- CMP R0, #2
- ADREQ R14, pms_configurationdescriptor
- MOVEQ R1, #0x20
- BEQ pms_senddescriptorcustomsize
- CMP R0, #3
- BNE pms_ctrlstall
- LDRB R0, [R14,#2] @ String descriptor index
- CMP R0, #0
- LDREQ R0, pms_langstringdescriptor
- STREQ R0, [R14]
- BEQ pms_senddescriptor
- CMP R0, #1
- CMPNE R0, #2
- ADREQ R14, pms_devnamestringdescriptor
- BNE pms_ctrlstall
-@ fallthrough
-
-pms_senddescriptor:
- LDRB R1, [R14] @ Descriptor length
-@ fallthrough
-
-pms_senddescriptorcustomsize:
- LDRH R0, pms_ctrlbuf+6 @ Requested length
- CMP R0, R1
- MOVLO R1, R0
-B pms_ctrlsend
-
-pms_SET_ADDRESS:
- LDRH R1, [R14,#2] @ new address
- LDR R0, [R11,#0x800]
- BIC R0, R0, #0x000007F0
- ORR R0, R0, R1,LSL#4
- STR R0, [R11,#0x800] @ set new address
-@ fallthrough
-
-pms_SET_FEATURE:
- MOV R1, #0 @ zero-length ACK
-B pms_ctrlsend
-
-pms_20803180:
-.word 0x20803180
-
-.ltorg
-
-.align 4
-
-pms_configurationdescriptor:
-.word 0x00200209
-.word 0xC0000101
-.word 0x00040932
-.word 0xFFFF0200
-.word 0x050700FF
-.word 0x02000204
-.word 0x83050701
-.word 0x01020002
-
-pms_devicedescriptor:
-.word 0x02000112
-.word 0x40FFFFFF
-.word 0xA112FFFF
-.word 0x02010001
-.word 0x00010100
-
-pms_00080200:
-.word 0x00080200
-
-pms_20080040:
-.word 0x20080040
-
-pms_000001FF:
-.word 0x000001FF
-
-pms_devnamestringdescriptor:
-.word 0x0052030C
-.word 0x00500042
-.word 0x0053004D
-
-pms_langstringdescriptor:
-.word 0x04090304
-
-pms_ctrlbuf:
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-.word 0
-
-pms_recvbuf:
-.word 0
-.word 0
-
-pms_GET_STATUS:
- LDRB R0, [R14]
- CMP R0, #0x80
- STREQ R12, [R14]
- STRNE R13, [R14]
- MOV R1, #2
-B pms_ctrlsend
-
-.size post_mortem_stub, .-post_mortem_stub
+.section .text.post_mortem_stub, "ax", %progbits +.align 4 +.global post_mortem_stub +.type post_mortem_stub, %function +post_mortem_stub: +MSR CPSR_c, #0xD3 @ Supervisor mode, no IRQs, no FIQs +MRC p15, 0, R0,c1,c0 +BIC R0, R0, #5 +MCR p15, 0, R0,c1,c0 @ Disable the Protection Unit and DCache +MOV R13, #0 +pms_flushcache_loop: + MCR p15, 0, R13,c7,c14,2 + ADD R0, R13, #0x10 + MCR p15, 0, R0,c7,c14,2 + ADD R0, R0, #0x10 + MCR p15, 0, R0,c7,c14,2 + ADD R0, R0, #0x10 + MCR p15, 0, R0,c7,c14,2 + ADDS R13, R13, #0x04000000 +BNE pms_flushcache_loop +MCR p15, 0, R13,c7,c10,4 + +LDR R7, pms_00080200 +ORR R8, R7, #0x8000 +ADR R9, pms_recvbuf +LDR R10, pms_20080040 +MOV R11, #0x38800000 +MOV R12, #1 + +MOV R2, #0x3C400000 +ADD R1, R2, #0x00100000 @ Enable USB clocks +LDR R0, [R1,#0x28] +BIC R0, R0, #0x4000 +STR R0, [R1,#0x28] +LDR R0, [R1,#0x40] +BIC R0, R0, #0x800 +STR R0, [R1,#0x40] +LDR R0, pms_20803180 @ Clocking config +STR R0, [R1] +MOV R0, #0x280 +STR R0, [R1,#0x3C] +MRC p15, 0, R0,c1,c0 +ORR R0, R0, #0xc0000000 +MCR p15, 0, R0,c1,c0 @ Asynchronous mode + +STR R13, [R11,#0xE00] @ PHY clock enable + +MOV R1, #0x800 +ORR R0, R2, #2 +STR R0, [R11,#0x804] @ USB2 Gadget: Soft disconnect + +STR R13, [R2] @ USB2 PHY: Power on +STR R12, [R2,#0x08] @ USB2 PHY: Assert Software Reset +MOV R0, #0x10000 +pms_wait: +SUBS R0, R0, #1 +BNE pms_wait +STR R13, [R2,#0x08] @ USB2 PHY: Deassert Software Reset +STR R13, [R2,#0x04] @ USB2 PHY: Clock is 48MHz + +STR R12, [R11,#0x10] @ USB2 Gadget: Assert Core Software Reset +pms_waitcorereset: +LDR R0, [R11,#0x10] @ USB2 Gadget: Wait for Core to reset +TST R0, #1 +BNE pms_waitcorereset +TST R0, #0x80000000 @ USB2 Gadget: Wait for AHB IDLE +BEQ pms_waitcorereset + +MOV R0, #0x200 +STR R0, [R11,#0x24] @ USB2 Gadget: RX FIFO size: 512 bytes +ORR R0, R0, #0x2000000 +STR R0, [R11,#0x28] @ USB2 Gadget: Non-periodic TX FIFO size: 512 bytes +MOV R0, #0x26 +STR R0, [R11,#0x08] @ USB2 Gadget: DMA Enable, Burst Length: 4, Mask Interrupts +MOV R0, #0x1400 +ADD R0, R0, #8 +STR R0, [R11,#0x0C] @ USB2 Gadget: PHY IF is 16bit, Turnaround 5 +STR R1, [R11,#0x804] @ USB2 Gadget: Soft reconnect + +ADR R14, pms_ctrlbuf +ORR R5, R8, #0x84000000 +@ fallthrough + +pms_mainloop: + LDR R3, [R11,#0x14] @ Global USB interrupts + TST R3, #0x00001000 @ BUS reset + BEQ pms_noreset + MOV R0, #0x500 + STR R0, [R11,#0x804] + MOV R0, #4 + STR R0, [R11,#0x800] @ USB2 Gadget: Device Address 0, STALL on non-zero length status stage + MOV R0, #0x8000 + STR R0, [R11,#0x900] @ USB2 Gadget: Endpoint 0 IN Control: ACTIVE + STR R10, [R11,#0xB10] @ USB2 Gadget: Endpoint 0 OUT Transfer Size: 64 Bytes, 1 Packet, 1 Setup Packet + STR R14, [R11,#0xB14] @ USB2 Gadget: Endpoint 0 OUT DMA Address: pms_ctrlbuf + ORR R6, R0, #0x84000000 + STR R6, [R11,#0xB00] @ USB2 Gadget: Endpoint 0 OUT Control: ENABLE CLEARNAK + STR R8, [R11,#0x960] @ USB2 Gadget: Endpoint 3 IN Control: ACTIVE BULK, 512 byte packets + STR R8, [R11,#0xB80] @ USB2 Gadget: Endpoint 4 OUT Control: ACTIVE BULK, 512 byte packets + STR R7, [R11,#0xB90] @ USB2 Gadget: Endpoint 4 OUT Transfer Size: 512 Bytes, 1 Packet + STR R9, [R11,#0xB94] @ USB2 Gadget: Endpoint 4 OUT DMA Address: pms_recvbuf + ORR R4, R5, #0x10000000 + STR R4, [R11,#0xB80] @ USB2 Gadget: Endpoint 4 OUT Control: ENABLE CLEARNAK DATA0 + pms_noreset: + LDR R0, [R11,#0x908] @ Just ACK all IN events... + STR R0, [R11,#0x908] + LDR R0, [R11,#0x968] + STR R0, [R11,#0x968] + LDR R2, [R11,#0xB08] + MOVS R2, R2 @ Event on OUT EP0 + BEQ pms_noep0out + TST R2, #8 @ SETUP phase done + BEQ pms_controldone + LDRB R0, [R14,#1] @ Get request type + CMP R0, #0 + BEQ pms_GET_STATUS + CMP R0, #1 + BEQ pms_CLEAR_FEATURE + CMP R0, #3 + BEQ pms_SET_FEATURE + CMP R0, #5 + BEQ pms_SET_ADDRESS + CMP R0, #6 + BEQ pms_GET_DESCRIPTOR + CMP R0, #8 + BEQ pms_GET_CONFIGURATION + CMP R0, #9 + BEQ pms_SET_CONFIGURATION + pms_ctrlstall: + LDR R0, [R11,#0x900] + ORR R0, R0, #0x00200000 + STR R0, [R11,#0x900] @ Stall IN EP0 + LDR R0, [R11,#0xB00] + ORR R0, R0, #0x00200000 + STR R0, [R11,#0xB00] @ Stall OUT EP0 + pms_controldone: + STR R10, [R11,#0xB10] @ OUT EP0: 64 Bytes, 1 Packet, 1 Setup Packet + STR R14, [R11,#0xB14] @ OUT EP0: DMA address + STR R6, [R11,#0xB00] @ OUT EP0: Enable ClearNAK + pms_noep0out: + STR R2, [R11,#0xB08] @ ACK it, whatever it was... + LDR R2, [R11,#0xB88] + MOVS R2, R2 @ Event on OUT EP4 + BEQ pms_noep1out + TST R2, #1 @ XFER complete + BEQ pms_datadone + LDR R0, pms_000001FF + LDR R1, pms_recvbuf+4 + ADD R0, R0, R1 + MOV R0, R0,LSR#9 + ORR R1, R1, R0,LSL#19 @ Number of packets + LDR R0, pms_recvbuf + STR R1, [R11,#0x970] @ EP3 IN: Number of packets, size + STR R0, [R11,#0x974] @ EP3 IN: DMA address + STR R5, [R11,#0x960] @ EP3 IN: Enable ClearNAK + pms_datadone: + STR R7, [R11,#0xB90] @ OUT EP4: 512 Bytes, 1 Packet + STR R9, [R11,#0xB94] @ Out EP4: DMA address + STR R5, [R11,#0xB80] @ Out EP4: Enable ClearNAK + pms_noep1out: + STR R2, [R11,#0xB88] @ ACK it, whatever it was... + STR R3, [R11,#0x14] @ ACK global ints +B pms_mainloop + +pms_CLEAR_FEATURE: + LDRB R0, [R14] + CMP R0, #2 + LDREQ R0, [R14,#2] + BICEQ R0, R0, #0x00800000 + CMPEQ R0, #0x00010000 +@ fallthrough + +pms_SET_CONFIGURATION: + ORREQ R0, R8, #0x10000000 + STREQ R0, [R11,#0x960] @ EP3 IN: Set DATA0 PID + STREQ R4, [R11,#0xB80] @ EP4 OUT: Set DATA0 PID +B pms_SET_FEATURE @ zero-length ACK + +pms_GET_CONFIGURATION: + MOV R1, #1 + STR R1, [R14] +@ fallthrough + +pms_ctrlsend: + ORR R0, R1, #0x00080000 @ 1 Packet + STR R0, [R11,#0x910] @ EP0 IN: 1 Packet, Size as in R1 + STR R14, [R11,#0x914] @ EP0 IN: DMA address + ORR R0, R6, #0x1800 + STR R0, [R11,#0x900] @ EP0 IN: Enable ClearNAK + ADR R14, pms_ctrlbuf +B pms_controldone + +pms_GET_DESCRIPTOR: + LDRB R0, [R14,#3] @ Descriptor type + CMP R0, #1 + ADREQ R14, pms_devicedescriptor + BEQ pms_senddescriptor + CMP R0, #2 + ADREQ R14, pms_configurationdescriptor + MOVEQ R1, #0x20 + BEQ pms_senddescriptorcustomsize + CMP R0, #3 + BNE pms_ctrlstall + LDRB R0, [R14,#2] @ String descriptor index + CMP R0, #0 + LDREQ R0, pms_langstringdescriptor + STREQ R0, [R14] + BEQ pms_senddescriptor + CMP R0, #1 + CMPNE R0, #2 + ADREQ R14, pms_devnamestringdescriptor + BNE pms_ctrlstall +@ fallthrough + +pms_senddescriptor: + LDRB R1, [R14] @ Descriptor length +@ fallthrough + +pms_senddescriptorcustomsize: + LDRH R0, pms_ctrlbuf+6 @ Requested length + CMP R0, R1 + MOVLO R1, R0 +B pms_ctrlsend + +pms_SET_ADDRESS: + LDRH R1, [R14,#2] @ new address + LDR R0, [R11,#0x800] + BIC R0, R0, #0x000007F0 + ORR R0, R0, R1,LSL#4 + STR R0, [R11,#0x800] @ set new address +@ fallthrough + +pms_SET_FEATURE: + MOV R1, #0 @ zero-length ACK +B pms_ctrlsend + +pms_20803180: +.word 0x20803180 + +.ltorg + +.align 4 + +pms_configurationdescriptor: +.word 0x00200209 +.word 0xC0000101 +.word 0x00040932 +.word 0xFFFF0200 +.word 0x050700FF +.word 0x02000204 +.word 0x83050701 +.word 0x01020002 + +pms_devicedescriptor: +.word 0x02000112 +.word 0x40FFFFFF +.word 0xA112FFFF +.word 0x02010001 +.word 0x00010100 + +pms_00080200: +.word 0x00080200 + +pms_20080040: +.word 0x20080040 + +pms_000001FF: +.word 0x000001FF + +pms_devnamestringdescriptor: +.word 0x0052030C +.word 0x00500042 +.word 0x0053004D + +pms_langstringdescriptor: +.word 0x04090304 + +pms_ctrlbuf: +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 +.word 0 + +pms_recvbuf: +.word 0 +.word 0 + +pms_GET_STATUS: + LDRB R0, [R14] + CMP R0, #0x80 + STREQ R12, [R14] + STRNE R13, [R14] + MOV R1, #2 +B pms_ctrlsend + +.size post_mortem_stub, .-post_mortem_stub diff --git a/firmware/target/arm/s5l8702/debug-s5l8702.c b/firmware/target/arm/s5l8702/debug-s5l8702.c index 5001d61..f49595a 100644 --- a/firmware/target/arm/s5l8702/debug-s5l8702.c +++ b/firmware/target/arm/s5l8702/debug-s5l8702.c @@ -1,166 +1,166 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: debug-s5l8700.c 28719 2010-12-01 18:35:01Z Buschel $
- *
- * Copyright © 2008 Rafaël Carré
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#include <stdbool.h>
-#include "config.h"
-#include "kernel.h"
-#include "debug-target.h"
-#include "button.h"
-#include "lcd.h"
-#include "font.h"
-#include "storage.h"
-#include "power.h"
-#include "pmu-target.h"
-#include "pcm-target.h"
-
-/* Skeleton for adding target specific debug info to the debug menu
- */
-
-#define _DEBUG_PRINTF(a, varargs...) lcd_putsf(0, line++, (a), ##varargs);
-
-extern int lcd_type;
-bool dbg_hw_info(void)
-{
- int line;
- int i;
- unsigned int state = 0;
- const unsigned int max_states=3;
-
- lcd_clear_display();
- lcd_setfont(FONT_SYSFIXED);
-
- state=0;
- while(1)
- {
- lcd_clear_display();
- line = 0;
-
- if(state == 0)
- {
- _DEBUG_PRINTF("CPU:");
- _DEBUG_PRINTF("current_tick: %d", (unsigned int)current_tick);
- line++;
-
- _DEBUG_PRINTF("LCD type: %d", lcd_type);
- line++;
- }
- else if(state==1)
- {
- _DEBUG_PRINTF("PMU:");
- for(i=0;i<7;i++)
- {
- char *device[] = {"(unknown)",
- "(unknown)",
- "(unknown)",
- "(unknown)",
- "(unknown)",
- "(unknown)",
- "(unknown)"};
- _DEBUG_PRINTF("ldo%d %s: %dmV %s",i,
- pmu_read(0x2e + (i << 1))?" on":"off",
- 900 + pmu_read(0x2d + (i << 1))*100,
- device[i]);
- }
- _DEBUG_PRINTF("cpu voltage: %dmV",625 + pmu_read(0x1e)*25);
- _DEBUG_PRINTF("memory voltage: %dmV",625 + pmu_read(0x22)*25);
- line++;
- _DEBUG_PRINTF("charging: %s", charging_state() ? "true" : "false");
- _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off");
- _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28));
- }
- else if(state==2)
- {
- _DEBUG_PRINTF("Audio DMA:");
- _DEBUG_PRINTF(">%08X %08X %08X %08X %08X", DMAC0C0CONFIG, DMAC0C0SRCADDR,
- DMAC0C0DESTADDR, DMAC0C0NEXTLLI, DMAC0C0CONTROL);
- for(i = 0; i < PCM_LLICOUNT; i++)
- _DEBUG_PRINTF("%08X: %08X %08X %08X %08X", &pcm_lli[i], pcm_lli[i].srcaddr,
- pcm_lli[i].dstaddr, pcm_lli[i].nextlli, pcm_lli[i].control);
- _DEBUG_PRINTF("chunk: %08X %08X", pcm_chunksize, pcm_remaining);
- }
- else
- {
- state=0;
- }
-
-
- lcd_update();
- switch(button_get_w_tmo(HZ/20))
- {
- case BUTTON_SCROLL_BACK:
- if(state!=0) state--;
- break;
-
- case BUTTON_SCROLL_FWD:
- if(state!=max_states-1)
- {
- state++;
- }
- break;
-
- case DEBUG_CANCEL:
- case BUTTON_REL:
- lcd_setfont(FONT_UI);
- return false;
- }
- }
-
- lcd_setfont(FONT_UI);
- return false;
-}
-
-bool dbg_ports(void)
-{
- int line;
-
- lcd_setfont(FONT_SYSFIXED);
-
- while(1)
- {
- lcd_clear_display();
- line = 0;
-
- _DEBUG_PRINTF("GPIO 0: %08x",(unsigned int)PDAT(0));
- _DEBUG_PRINTF("GPIO 1: %08x",(unsigned int)PDAT(1));
- _DEBUG_PRINTF("GPIO 2: %08x",(unsigned int)PDAT(2));
- _DEBUG_PRINTF("GPIO 3: %08x",(unsigned int)PDAT(3));
- _DEBUG_PRINTF("GPIO 4: %08x",(unsigned int)PDAT(4));
- _DEBUG_PRINTF("GPIO 5: %08x",(unsigned int)PDAT(5));
- _DEBUG_PRINTF("GPIO 6: %08x",(unsigned int)PDAT(6));
- _DEBUG_PRINTF("GPIO 7: %08x",(unsigned int)PDAT(7));
- _DEBUG_PRINTF("GPIO 8: %08x",(unsigned int)PDAT(8));
- _DEBUG_PRINTF("GPIO 9: %08x",(unsigned int)PDAT(9));
- _DEBUG_PRINTF("GPIO 10: %08x",(unsigned int)PDAT(10));
- _DEBUG_PRINTF("GPIO 11: %08x",(unsigned int)PDAT(11));
- _DEBUG_PRINTF("GPIO 12: %08x",(unsigned int)PDAT(12));
- _DEBUG_PRINTF("GPIO 13: %08x",(unsigned int)PDAT(13));
- _DEBUG_PRINTF("GPIO 14: %08x",(unsigned int)PDAT(14));
- _DEBUG_PRINTF("GPIO 15: %08x",(unsigned int)PDAT(15));
- _DEBUG_PRINTF("USEC : %08x",(unsigned int)USEC_TIMER);
-
- lcd_update();
- if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
- break;
- }
- lcd_setfont(FONT_UI);
- return false;
-}
-
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: debug-s5l8700.c 28719 2010-12-01 18:35:01Z Buschel $ + * + * Copyright © 2008 Rafaël Carré + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include <stdbool.h> +#include "config.h" +#include "kernel.h" +#include "debug-target.h" +#include "button.h" +#include "lcd.h" +#include "font.h" +#include "storage.h" +#include "power.h" +#include "pmu-target.h" +#include "pcm-target.h" + +/* Skeleton for adding target specific debug info to the debug menu + */ + +#define _DEBUG_PRINTF(a, varargs...) lcd_putsf(0, line++, (a), ##varargs); + +extern int lcd_type; +bool dbg_hw_info(void) +{ + int line; + int i; + unsigned int state = 0; + const unsigned int max_states=3; + + lcd_clear_display(); + lcd_setfont(FONT_SYSFIXED); + + state=0; + while(1) + { + lcd_clear_display(); + line = 0; + + if(state == 0) + { + _DEBUG_PRINTF("CPU:"); + _DEBUG_PRINTF("current_tick: %d", (unsigned int)current_tick); + line++; + + _DEBUG_PRINTF("LCD type: %d", lcd_type); + line++; + } + else if(state==1) + { + _DEBUG_PRINTF("PMU:"); + for(i=0;i<7;i++) + { + char *device[] = {"(unknown)", + "(unknown)", + "(unknown)", + "(unknown)", + "(unknown)", + "(unknown)", + "(unknown)"}; + _DEBUG_PRINTF("ldo%d %s: %dmV %s",i, + pmu_read(0x2e + (i << 1))?" on":"off", + 900 + pmu_read(0x2d + (i << 1))*100, + device[i]); + } + _DEBUG_PRINTF("cpu voltage: %dmV",625 + pmu_read(0x1e)*25); + _DEBUG_PRINTF("memory voltage: %dmV",625 + pmu_read(0x22)*25); + line++; + _DEBUG_PRINTF("charging: %s", charging_state() ? "true" : "false"); + _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off"); + _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28)); + } + else if(state==2) + { + _DEBUG_PRINTF("Audio DMA:"); + _DEBUG_PRINTF(">%08X %08X %08X %08X %08X", DMAC0C0CONFIG, DMAC0C0SRCADDR, + DMAC0C0DESTADDR, DMAC0C0NEXTLLI, DMAC0C0CONTROL); + for(i = 0; i < PCM_LLICOUNT; i++) + _DEBUG_PRINTF("%08X: %08X %08X %08X %08X", &pcm_lli[i], pcm_lli[i].srcaddr, + pcm_lli[i].dstaddr, pcm_lli[i].nextlli, pcm_lli[i].control); + _DEBUG_PRINTF("chunk: %08X %08X", pcm_chunksize, pcm_remaining); + } + else + { + state=0; + } + + + lcd_update(); + switch(button_get_w_tmo(HZ/20)) + { + case BUTTON_SCROLL_BACK: + if(state!=0) state--; + break; + + case BUTTON_SCROLL_FWD: + if(state!=max_states-1) + { + state++; + } + break; + + case DEBUG_CANCEL: + case BUTTON_REL: + lcd_setfont(FONT_UI); + return false; + } + } + + lcd_setfont(FONT_UI); + return false; +} + +bool dbg_ports(void) +{ + int line; + + lcd_setfont(FONT_SYSFIXED); + + while(1) + { + lcd_clear_display(); + line = 0; + + _DEBUG_PRINTF("GPIO 0: %08x",(unsigned int)PDAT(0)); + _DEBUG_PRINTF("GPIO 1: %08x",(unsigned int)PDAT(1)); + _DEBUG_PRINTF("GPIO 2: %08x",(unsigned int)PDAT(2)); + _DEBUG_PRINTF("GPIO 3: %08x",(unsigned int)PDAT(3)); + _DEBUG_PRINTF("GPIO 4: %08x",(unsigned int)PDAT(4)); + _DEBUG_PRINTF("GPIO 5: %08x",(unsigned int)PDAT(5)); + _DEBUG_PRINTF("GPIO 6: %08x",(unsigned int)PDAT(6)); + _DEBUG_PRINTF("GPIO 7: %08x",(unsigned int)PDAT(7)); + _DEBUG_PRINTF("GPIO 8: %08x",(unsigned int)PDAT(8)); + _DEBUG_PRINTF("GPIO 9: %08x",(unsigned int)PDAT(9)); + _DEBUG_PRINTF("GPIO 10: %08x",(unsigned int)PDAT(10)); + _DEBUG_PRINTF("GPIO 11: %08x",(unsigned int)PDAT(11)); + _DEBUG_PRINTF("GPIO 12: %08x",(unsigned int)PDAT(12)); + _DEBUG_PRINTF("GPIO 13: %08x",(unsigned int)PDAT(13)); + _DEBUG_PRINTF("GPIO 14: %08x",(unsigned int)PDAT(14)); + _DEBUG_PRINTF("GPIO 15: %08x",(unsigned int)PDAT(15)); + _DEBUG_PRINTF("USEC : %08x",(unsigned int)USEC_TIMER); + + lcd_update(); + if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) + break; + } + lcd_setfont(FONT_UI); + return false; +} + diff --git a/firmware/target/arm/s5l8702/debug-target.h b/firmware/target/arm/s5l8702/debug-target.h index 55ea497..a493c0e 100644 --- a/firmware/target/arm/s5l8702/debug-target.h +++ b/firmware/target/arm/s5l8702/debug-target.h @@ -1,33 +1,33 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: debug-target.h 28522 2010-11-06 14:24:25Z wodz $
- *
- * Copyright (C) 2007 by Karl Kurbjun
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#ifndef _DEBUG_TARGET_H_
-#define _DEBUG_TARGET_H_
-
-#include <stdbool.h>
-
-#define DEBUG_CANCEL BUTTON_MENU
-
-bool dbg_hw_info(void);
-bool dbg_ports(void);
-
-#endif /* _DEBUG_TARGET_H_ */
-
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: debug-target.h 28522 2010-11-06 14:24:25Z wodz $ + * + * Copyright (C) 2007 by Karl Kurbjun + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _DEBUG_TARGET_H_ +#define _DEBUG_TARGET_H_ + +#include <stdbool.h> + +#define DEBUG_CANCEL BUTTON_MENU + +bool dbg_hw_info(void); +bool dbg_ports(void); + +#endif /* _DEBUG_TARGET_H_ */ + diff --git a/firmware/target/arm/s5l8702/i2c-s5l8702.c b/firmware/target/arm/s5l8702/i2c-s5l8702.c index 294e5b5..4d0e418 100644 --- a/firmware/target/arm/s5l8702/i2c-s5l8702.c +++ b/firmware/target/arm/s5l8702/i2c-s5l8702.c @@ -1,196 +1,196 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: i2c-s5l8700.c 28589 2010-11-14 15:19:30Z theseven $
- *
- * Copyright (C) 2009 by Bertrik Sikken
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#include "config.h"
-#include "system.h"
-#include "kernel.h"
-#include "i2c-s5l8702.h"
-
-/* Driver for the s5l8700 built-in I2C controller in master mode
-
- Both the i2c_read and i2c_write function take the following arguments:
- * slave, the address of the i2c slave device to read from / write to
- * address, optional sub-address in the i2c slave (unused if -1)
- * len, number of bytes to be transfered
- * data, pointer to data to be transfered
- A return value < 0 indicates an error.
-
- Note:
- * blocks the calling thread for the entire duraton of the i2c transfer but
- uses wakeup_wait/wakeup_signal to allow other threads to run.
- * ACK from slave is not checked, so functions never return an error
-*/
-
-static struct mutex i2c_mtx[2];
-
-static void i2c_on(int bus)
-{
- /* enable I2C clock */
- PWRCON(1) &= ~(1 << 4);
-
- IICCON(bus) = (1 << 7) | /* ACK_GEN */
- (0 << 6) | /* CLKSEL = PCLK/16 */
- (1 << 5) | /* INT_EN */
- (1 << 4) | /* IRQ clear */
- (7 << 0); /* CK_REG */
-
- /* serial output on */
- IICSTAT(bus) = (1 << 4);
-}
-
-static void i2c_off(int bus)
-{
- /* serial output off */
- IICSTAT(bus) = 0;
-
- /* disable I2C clock */
- PWRCON(1) |= (1 << 4);
-}
-
-void i2c_init()
-{
- mutex_init(&i2c_mtx[0]);
- mutex_init(&i2c_mtx[1]);
-}
-
-int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data)
-{
- mutex_lock(&i2c_mtx[bus]);
- i2c_on(bus);
- long timeout = current_tick + HZ / 50;
-
- /* START */
- IICDS(bus) = slave & ~1;
- IICSTAT(bus) = 0xF0;
- IICCON(bus) = 0xB3;
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 1;
- }
-
-
- if (address >= 0) {
- /* write address */
- IICDS(bus) = address;
- IICCON(bus) = 0xB3;
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 2;
- }
- }
-
- /* write data */
- while (len--) {
- IICDS(bus) = *data++;
- IICCON(bus) = 0xB3;
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 4;
- }
- }
-
- /* STOP */
- IICSTAT(bus) = 0xD0;
- IICCON(bus) = 0xB3;
- while ((IICSTAT(bus) & (1 << 5)) != 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 5;
- }
-
- i2c_off(bus);
- mutex_unlock(&i2c_mtx[bus]);
- return 0;
-}
-
-int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data)
-{
- mutex_lock(&i2c_mtx[bus]);
- i2c_on(bus);
- long timeout = current_tick + HZ / 50;
-
- if (address >= 0) {
- /* START */
- IICDS(bus) = slave & ~1;
- IICSTAT(bus) = 0xF0;
- IICCON(bus) = 0xB3;
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 1;
- }
-
- /* write address */
- IICDS(bus) = address;
- IICCON(bus) = 0xB3;
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 2;
- }
- }
-
- /* (repeated) START */
- IICDS(bus) = slave | 1;
- IICSTAT(bus) = 0xB0;
- IICCON(bus) = 0xB3;
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 3;
- }
-
- while (len--) {
- IICCON(bus) = (len == 0) ? 0x33 : 0xB3; /* NAK or ACK */
- while ((IICCON(bus) & 0x10) == 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 4;
- }
- *data++ = IICDS(bus);
- }
-
- /* STOP */
- IICSTAT(bus) = 0x90;
- IICCON(bus) = 0xB3;
- while ((IICSTAT(bus) & (1 << 5)) != 0)
- if (TIME_AFTER(current_tick, timeout))
- {
- mutex_unlock(&i2c_mtx[bus]);
- return 5;
- }
-
- i2c_off(bus);
- mutex_unlock(&i2c_mtx[bus]);
- return 0;
-}
-
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: i2c-s5l8700.c 28589 2010-11-14 15:19:30Z theseven $ + * + * Copyright (C) 2009 by Bertrik Sikken + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include "config.h" +#include "system.h" +#include "kernel.h" +#include "i2c-s5l8702.h" + +/* Driver for the s5l8700 built-in I2C controller in master mode + + Both the i2c_read and i2c_write function take the following arguments: + * slave, the address of the i2c slave device to read from / write to + * address, optional sub-address in the i2c slave (unused if -1) + * len, number of bytes to be transfered + * data, pointer to data to be transfered + A return value < 0 indicates an error. + + Note: + * blocks the calling thread for the entire duraton of the i2c transfer but + uses wakeup_wait/wakeup_signal to allow other threads to run. + * ACK from slave is not checked, so functions never return an error +*/ + +static struct mutex i2c_mtx[2]; + +static void i2c_on(int bus) +{ + /* enable I2C clock */ + PWRCON(1) &= ~(1 << 4); + + IICCON(bus) = (1 << 7) | /* ACK_GEN */ + (0 << 6) | /* CLKSEL = PCLK/16 */ + (1 << 5) | /* INT_EN */ + (1 << 4) | /* IRQ clear */ + (7 << 0); /* CK_REG */ + + /* serial output on */ + IICSTAT(bus) = (1 << 4); +} + +static void i2c_off(int bus) +{ + /* serial output off */ + IICSTAT(bus) = 0; + + /* disable I2C clock */ + PWRCON(1) |= (1 << 4); +} + +void i2c_init() +{ + mutex_init(&i2c_mtx[0]); + mutex_init(&i2c_mtx[1]); +} + +int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data) +{ + mutex_lock(&i2c_mtx[bus]); + i2c_on(bus); + long timeout = current_tick + HZ / 50; + + /* START */ + IICDS(bus) = slave & ~1; + IICSTAT(bus) = 0xF0; + IICCON(bus) = 0xB3; + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 1; + } + + + if (address >= 0) { + /* write address */ + IICDS(bus) = address; + IICCON(bus) = 0xB3; + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 2; + } + } + + /* write data */ + while (len--) { + IICDS(bus) = *data++; + IICCON(bus) = 0xB3; + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 4; + } + } + + /* STOP */ + IICSTAT(bus) = 0xD0; + IICCON(bus) = 0xB3; + while ((IICSTAT(bus) & (1 << 5)) != 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 5; + } + + i2c_off(bus); + mutex_unlock(&i2c_mtx[bus]); + return 0; +} + +int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data) +{ + mutex_lock(&i2c_mtx[bus]); + i2c_on(bus); + long timeout = current_tick + HZ / 50; + + if (address >= 0) { + /* START */ + IICDS(bus) = slave & ~1; + IICSTAT(bus) = 0xF0; + IICCON(bus) = 0xB3; + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 1; + } + + /* write address */ + IICDS(bus) = address; + IICCON(bus) = 0xB3; + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 2; + } + } + + /* (repeated) START */ + IICDS(bus) = slave | 1; + IICSTAT(bus) = 0xB0; + IICCON(bus) = 0xB3; + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 3; + } + + while (len--) { + IICCON(bus) = (len == 0) ? 0x33 : 0xB3; /* NAK or ACK */ + while ((IICCON(bus) & 0x10) == 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 4; + } + *data++ = IICDS(bus); + } + + /* STOP */ + IICSTAT(bus) = 0x90; + IICCON(bus) = 0xB3; + while ((IICSTAT(bus) & (1 << 5)) != 0) + if (TIME_AFTER(current_tick, timeout)) + { + mutex_unlock(&i2c_mtx[bus]); + return 5; + } + + i2c_off(bus); + mutex_unlock(&i2c_mtx[bus]); + return 0; +} + diff --git a/firmware/target/arm/s5l8702/kernel-s5l8702.c b/firmware/target/arm/s5l8702/kernel-s5l8702.c index 7c5a697..af54e4d 100644 --- a/firmware/target/arm/s5l8702/kernel-s5l8702.c +++ b/firmware/target/arm/s5l8702/kernel-s5l8702.c @@ -1,56 +1,56 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: kernel-s5l8700.c 28795 2010-12-11 17:52:52Z Buschel $
- *
- * Copyright © 2009 Bertrik Sikken
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "config.h"
-#include "system.h"
-#include "kernel.h"
-
-/* S5L8702 driver for the kernel timer
-
- Timer B is configured as a 10 kHz timer
- */
-
-void INT_TIMERB(void)
-{
- /* clear interrupt */
- TBCON = TBCON;
-
- call_tick_tasks(); /* Run through the list of tick tasks */
-}
-
-void tick_start(unsigned int interval_in_ms)
-{
- int cycles = 10 * interval_in_ms;
-
- /* configure timer for 10 kHz */
- TBCMD = (1 << 1); /* TB_CLR */
- TBPRE = 337 - 1; /* prescaler */
- TBCON = (0 << 13) | /* TB_INT1_EN */
- (1 << 12) | /* TB_INT0_EN */
- (0 << 11) | /* TB_START */
- (2 << 8) | /* TB_CS = PCLK / 16 */
- (0 << 4); /* TB_MODE_SEL = interval mode */
- TBDATA0 = cycles; /* set interval period */
- TBCMD = (1 << 0); /* TB_EN */
-
- /* enable timer interrupt */
- VIC0INTENABLE = 1 << IRQ_TIMER;
-}
-
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: kernel-s5l8700.c 28795 2010-12-11 17:52:52Z Buschel $ + * + * Copyright © 2009 Bertrik Sikken + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "config.h" +#include "system.h" +#include "kernel.h" + +/* S5L8702 driver for the kernel timer + + Timer B is configured as a 10 kHz timer + */ + +void INT_TIMERB(void) +{ + /* clear interrupt */ + TBCON = TBCON; + + call_tick_tasks(); /* Run through the list of tick tasks */ +} + +void tick_start(unsigned int interval_in_ms) +{ + int cycles = 10 * interval_in_ms; + + /* configure timer for 10 kHz */ + TBCMD = (1 << 1); /* TB_CLR */ + TBPRE = 337 - 1; /* prescaler */ + TBCON = (0 << 13) | /* TB_INT1_EN */ + (1 << 12) | /* TB_INT0_EN */ + (0 << 11) | /* TB_START */ + (2 << 8) | /* TB_CS = PCLK / 16 */ + (0 << 4); /* TB_MODE_SEL = interval mode */ + TBDATA0 = cycles; /* set interval period */ + TBCMD = (1 << 0); /* TB_EN */ + + /* enable timer interrupt */ + VIC0INTENABLE = 1 << IRQ_TIMER; +} + diff --git a/firmware/target/arm/s5l8702/pcm-s5l8702.c b/firmware/target/arm/s5l8702/pcm-s5l8702.c index c3df77f..6461418 100644 --- a/firmware/target/arm/s5l8702/pcm-s5l8702.c +++ b/firmware/target/arm/s5l8702/pcm-s5l8702.c @@ -1,228 +1,228 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: pcm-s5l8700.c 28600 2010-11-14 19:49:20Z Buschel $
- *
- * Copyright © 2011 Michael Sparmann
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include <string.h>
-
-#include "config.h"
-#include "system.h"
-#include "audio.h"
-#include "s5l8702.h"
-#include "panic.h"
-#include "audiohw.h"
-#include "pcm.h"
-#include "pcm-internal.h"
-#include "pcm_sampr.h"
-#include "mmu-arm.h"
-#include "pcm-target.h"
-
-static volatile int locked = 0;
-static const int zerosample = 0;
-static unsigned char dblbuf[2][PCM_WATERMARK * 4];
-static int active_dblbuf;
-struct dma_lli pcm_lli[PCM_LLICOUNT] __attribute__((aligned(16)));
-static struct dma_lli* lastlli;
-static const unsigned char* dataptr;
-size_t pcm_remaining;
-size_t pcm_chunksize;
-
-/* Mask the DMA interrupt */
-void pcm_play_lock(void)
-{
- if (locked++ == 0) {
- //TODO: Urgh, I don't like that at all...
- VIC0INTENCLEAR = 1 << IRQ_DMAC0;
- }
-}
-
-/* Unmask the DMA interrupt if enabled */
-void pcm_play_unlock(void)
-{
- if (--locked == 0) {
- VIC0INTENABLE = 1 << IRQ_DMAC0;
- }
-}
-
-void INT_DMAC0C0(void) ICODE_ATTR;
-void INT_DMAC0C0(void)
-{
- DMAC0INTTCCLR = 1;
- if (!pcm_remaining)
- {
- pcm_play_get_more_callback((void**)&dataptr, &pcm_remaining);
- pcm_chunksize = pcm_remaining;
- }
- if (!pcm_remaining)
- {
- pcm_lli->nextlli = NULL;
- pcm_lli->control = 0x75249000;
- clean_dcache();
- return;
- }
- uint32_t lastsize = MIN(PCM_WATERMARK * 4, pcm_remaining / 2 + 1) & ~1;
- pcm_remaining -= lastsize;
- if (pcm_remaining) lastlli = &pcm_lli[ARRAYLEN(pcm_lli) - 1];
- else lastlli = pcm_lli;
- uint32_t chunksize = MIN(PCM_CHUNKSIZE * 4 - lastsize, pcm_remaining);
- if (pcm_remaining > chunksize && chunksize > pcm_remaining - PCM_WATERMARK * 8)
- chunksize = pcm_remaining - PCM_WATERMARK * 8;
- pcm_remaining -= chunksize;
- bool last = !chunksize;
- int i = 0;
- while (chunksize)
- {
- uint32_t thislli = MIN(PCM_LLIMAX * 4, chunksize);
- chunksize -= thislli;
- pcm_lli[i].srcaddr = (void*)dataptr;
- pcm_lli[i].dstaddr = (void*)((int)&I2STXDB0);
- pcm_lli[i].nextlli = chunksize ? &pcm_lli[i + 1] : lastlli;
- pcm_lli[i].control = (chunksize ? 0x75249000 : 0xf5249000) | (thislli / 2);
- dataptr += thislli;
- i++;
- }
- if (!pcm_remaining)
- {
- memcpy(dblbuf[active_dblbuf], dataptr, lastsize);
- lastlli->srcaddr = dblbuf[active_dblbuf];
- active_dblbuf ^= 1;
- }
- else lastlli->srcaddr = dataptr;
- lastlli->dstaddr = (void*)((int)&I2STXDB0);
- lastlli->nextlli = last ? NULL : pcm_lli;
- lastlli->control = (last ? 0xf5249000 : 0x75249000) | (lastsize / 2);
- dataptr += lastsize;
- clean_dcache();
- if (!(DMAC0C0CONFIG & 1) && (pcm_lli[0].control & 0xfff))
- {
- DMAC0C0LLI = pcm_lli[0];
- DMAC0C0CONFIG = 0x8a81;
- }
- else DMAC0C0NEXTLLI = pcm_lli;
-
- pcm_play_dma_started_callback();
-}
-
-void pcm_play_dma_start(const void* addr, size_t size)
-{
- dataptr = (const unsigned char*)addr;
- pcm_remaining = size;
- I2STXCOM = 0xe;
- DMAC0CONFIG |= 4;
- INT_DMAC0C0();
-}
-
-void pcm_play_dma_stop(void)
-{
- DMAC0C0CONFIG = 0x8a80;
- I2STXCOM = 0xa;
-}
-
-/* pause playback by disabling LRCK */
-void pcm_play_dma_pause(bool pause)
-{
- if (pause) I2STXCOM |= 1;
- else I2STXCOM &= ~1;
-}
-
-void pcm_play_dma_init(void)
-{
- PWRCON(0) &= ~(1 << 4);
- PWRCON(1) &= ~(1 << 7);
- I2S40 = 0x110;
- I2STXCON = 0xb100059;
- I2SCLKCON = 1;
- VIC0INTENABLE = 1 << IRQ_DMAC0;
-
- audiohw_preinit();
-}
-
-void pcm_play_dma_postinit(void)
-{
- audiohw_postinit();
-}
-
-void pcm_dma_apply_settings(void)
-{
-}
-
-size_t pcm_get_bytes_waiting(void)
-{
- int bytes = pcm_remaining;
- const struct dma_lli* lli = (const struct dma_lli*)((int)&DMAC0C0LLI);
- while (lli)
- {
- bytes += (lli->control & 0xfff) * 2;
- if (lli == lastlli) break;
- lli = lli->nextlli;
- }
- return bytes;
-}
-
-const void* pcm_play_dma_get_peak_buffer(int *count)
-{
- *count = (DMAC0C0LLI.control & 0xfff) * 2;
- return (void*)(((uint32_t)DMAC0C0LLI.srcaddr) & ~3);
-}
-
-#ifdef HAVE_PCM_DMA_ADDRESS
-void * pcm_dma_addr(void *addr)
-{
- return addr;
-}
-#endif
-
-
-/****************************************************************************
- ** Recording DMA transfer
- **/
-#ifdef HAVE_RECORDING
-void pcm_rec_lock(void)
-{
-}
-
-void pcm_rec_unlock(void)
-{
-}
-
-void pcm_rec_dma_stop(void)
-{
-}
-
-void pcm_rec_dma_start(void *addr, size_t size)
-{
- (void)addr;
- (void)size;
-}
-
-void pcm_rec_dma_close(void)
-{
-}
-
-
-void pcm_rec_dma_init(void)
-{
-}
-
-
-const void * pcm_rec_dma_get_peak_buffer(void)
-{
- return NULL;
-}
-
-#endif /* HAVE_RECORDING */
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: pcm-s5l8700.c 28600 2010-11-14 19:49:20Z Buschel $ + * + * Copyright © 2011 Michael Sparmann + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include <string.h> + +#include "config.h" +#include "system.h" +#include "audio.h" +#include "s5l8702.h" +#include "panic.h" +#include "audiohw.h" +#include "pcm.h" +#include "pcm-internal.h" +#include "pcm_sampr.h" +#include "mmu-arm.h" +#include "pcm-target.h" + +static volatile int locked = 0; +static const int zerosample = 0; +static unsigned char dblbuf[2][PCM_WATERMARK * 4]; +static int active_dblbuf; +struct dma_lli pcm_lli[PCM_LLICOUNT] __attribute__((aligned(16))); +static struct dma_lli* lastlli; +static const unsigned char* dataptr; +size_t pcm_remaining; +size_t pcm_chunksize; + +/* Mask the DMA interrupt */ +void pcm_play_lock(void) +{ + if (locked++ == 0) { + //TODO: Urgh, I don't like that at all... + VIC0INTENCLEAR = 1 << IRQ_DMAC0; + } +} + +/* Unmask the DMA interrupt if enabled */ +void pcm_play_unlock(void) +{ + if (--locked == 0) { + VIC0INTENABLE = 1 << IRQ_DMAC0; + } +} + +void INT_DMAC0C0(void) ICODE_ATTR; +void INT_DMAC0C0(void) +{ + DMAC0INTTCCLR = 1; + if (!pcm_remaining) + { + pcm_play_get_more_callback((void**)&dataptr, &pcm_remaining); + pcm_chunksize = pcm_remaining; + } + if (!pcm_remaining) + { + pcm_lli->nextlli = NULL; + pcm_lli->control = 0x75249000; + clean_dcache(); + return; + } + uint32_t lastsize = MIN(PCM_WATERMARK * 4, pcm_remaining / 2 + 1) & ~1; + pcm_remaining -= lastsize; + if (pcm_remaining) lastlli = &pcm_lli[ARRAYLEN(pcm_lli) - 1]; + else lastlli = pcm_lli; + uint32_t chunksize = MIN(PCM_CHUNKSIZE * 4 - lastsize, pcm_remaining); + if (pcm_remaining > chunksize && chunksize > pcm_remaining - PCM_WATERMARK * 8) + chunksize = pcm_remaining - PCM_WATERMARK * 8; + pcm_remaining -= chunksize; + bool last = !chunksize; + int i = 0; + while (chunksize) + { + uint32_t thislli = MIN(PCM_LLIMAX * 4, chunksize); + chunksize -= thislli; + pcm_lli[i].srcaddr = (void*)dataptr; + pcm_lli[i].dstaddr = (void*)((int)&I2STXDB0); + pcm_lli[i].nextlli = chunksize ? &pcm_lli[i + 1] : lastlli; + pcm_lli[i].control = (chunksize ? 0x75249000 : 0xf5249000) | (thislli / 2); + dataptr += thislli; + i++; + } + if (!pcm_remaining) + { + memcpy(dblbuf[active_dblbuf], dataptr, lastsize); + lastlli->srcaddr = dblbuf[active_dblbuf]; + active_dblbuf ^= 1; + } + else lastlli->srcaddr = dataptr; + lastlli->dstaddr = (void*)((int)&I2STXDB0); + lastlli->nextlli = last ? NULL : pcm_lli; + lastlli->control = (last ? 0xf5249000 : 0x75249000) | (lastsize / 2); + dataptr += lastsize; + clean_dcache(); + if (!(DMAC0C0CONFIG & 1) && (pcm_lli[0].control & 0xfff)) + { + DMAC0C0LLI = pcm_lli[0]; + DMAC0C0CONFIG = 0x8a81; + } + else DMAC0C0NEXTLLI = pcm_lli; + + pcm_play_dma_started_callback(); +} + +void pcm_play_dma_start(const void* addr, size_t size) +{ + dataptr = (const unsigned char*)addr; + pcm_remaining = size; + I2STXCOM = 0xe; + DMAC0CONFIG |= 4; + INT_DMAC0C0(); +} + +void pcm_play_dma_stop(void) +{ + DMAC0C0CONFIG = 0x8a80; + I2STXCOM = 0xa; +} + +/* pause playback by disabling LRCK */ +void pcm_play_dma_pause(bool pause) +{ + if (pause) I2STXCOM |= 1; + else I2STXCOM &= ~1; +} + +void pcm_play_dma_init(void) +{ + PWRCON(0) &= ~(1 << 4); + PWRCON(1) &= ~(1 << 7); + I2S40 = 0x110; + I2STXCON = 0xb100059; + I2SCLKCON = 1; + VIC0INTENABLE = 1 << IRQ_DMAC0; + + audiohw_preinit(); +} + +void pcm_play_dma_postinit(void) +{ + audiohw_postinit(); +} + +void pcm_dma_apply_settings(void) +{ +} + +size_t pcm_get_bytes_waiting(void) +{ + int bytes = pcm_remaining; + const struct dma_lli* lli = (const struct dma_lli*)((int)&DMAC0C0LLI); + while (lli) + { + bytes += (lli->control & 0xfff) * 2; + if (lli == lastlli) break; + lli = lli->nextlli; + } + return bytes; +} + +const void* pcm_play_dma_get_peak_buffer(int *count) +{ + *count = (DMAC0C0LLI.control & 0xfff) * 2; + return (void*)(((uint32_t)DMAC0C0LLI.srcaddr) & ~3); +} + +#ifdef HAVE_PCM_DMA_ADDRESS +void * pcm_dma_addr(void *addr) +{ + return addr; +} +#endif + + +/**************************************************************************** + ** Recording DMA transfer + **/ +#ifdef HAVE_RECORDING +void pcm_rec_lock(void) +{ +} + +void pcm_rec_unlock(void) +{ +} + +void pcm_rec_dma_stop(void) +{ +} + +void pcm_rec_dma_start(void *addr, size_t size) +{ + (void)addr; + (void)size; +} + +void pcm_rec_dma_close(void) +{ +} + + +void pcm_rec_dma_init(void) +{ +} + + +const void * pcm_rec_dma_get_peak_buffer(void) +{ + return NULL; +} + +#endif /* HAVE_RECORDING */ diff --git a/firmware/target/arm/s5l8702/pcm-target.h b/firmware/target/arm/s5l8702/pcm-target.h index 1b149a6..aefb64e 100644 --- a/firmware/target/arm/s5l8702/pcm-target.h +++ b/firmware/target/arm/s5l8702/pcm-target.h @@ -1,40 +1,40 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: system-target.h 28791 2010-12-11 09:39:33Z Buschel $
- *
- * Copyright (C) 2010 by Michael Sparmann
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef __PCM_TARGET_H__
-#define __PCM_TARGET_H__
-
-
-/* S5L8702 PCM driver tunables: */
-#define PCM_LLIMAX (2047) /* Maximum number of samples per LLI */
-#define PCM_CHUNKSIZE (10747) /* Maximum number of samples to handle with one IRQ */
- /* (bigger chunks will be segmented internally) */
-#define PCM_WATERMARK (512) /* Number of remaining samples to schedule IRQ at */
-
-
-#define PCM_LLICOUNT ((PCM_CHUNKSIZE - PCM_WATERMARK + PCM_LLIMAX - 1) / PCM_LLIMAX + 1)
-
-
-extern struct dma_lli pcm_lli[PCM_LLICOUNT];
-extern size_t pcm_remaining;
-extern size_t pcm_chunksize;
-
-
-#endif /* __PCM_TARGET_H__ */
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: system-target.h 28791 2010-12-11 09:39:33Z Buschel $ + * + * Copyright (C) 2010 by Michael Sparmann + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef __PCM_TARGET_H__ +#define __PCM_TARGET_H__ + + +/* S5L8702 PCM driver tunables: */ +#define PCM_LLIMAX (2047) /* Maximum number of samples per LLI */ +#define PCM_CHUNKSIZE (10747) /* Maximum number of samples to handle with one IRQ */ + /* (bigger chunks will be segmented internally) */ +#define PCM_WATERMARK (512) /* Number of remaining samples to schedule IRQ at */ + + +#define PCM_LLICOUNT ((PCM_CHUNKSIZE - PCM_WATERMARK + PCM_LLIMAX - 1) / PCM_LLIMAX + 1) + + +extern struct dma_lli pcm_lli[PCM_LLICOUNT]; +extern size_t pcm_remaining; +extern size_t pcm_chunksize; + + +#endif /* __PCM_TARGET_H__ */ diff --git a/firmware/target/arm/s5l8702/system-target.h b/firmware/target/arm/s5l8702/system-target.h index 30e53ad..799efb7 100644 --- a/firmware/target/arm/s5l8702/system-target.h +++ b/firmware/target/arm/s5l8702/system-target.h @@ -1,47 +1,47 @@ -/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: system-target.h 28791 2010-12-11 09:39:33Z Buschel $
- *
- * Copyright (C) 2007 by Dave Chapman
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef SYSTEM_TARGET_H
-#define SYSTEM_TARGET_H
-
-#include "system-arm.h"
-#include "mmu-arm.h"
-
-#define CPUFREQ_SLEEP 32768
-#define CPUFREQ_MAX 216000000
-#define CPUFREQ_DEFAULT 108000000
-#define CPUFREQ_NORMAL 108000000
-
-#define STORAGE_WANTS_ALIGN
-
-#define inl(a) (*(volatile unsigned long *) (a))
-#define outl(a,b) (*(volatile unsigned long *) (b) = (a))
-#define inb(a) (*(volatile unsigned char *) (a))
-#define outb(a,b) (*(volatile unsigned char *) (b) = (a))
-#define inw(a) (*(volatile unsigned short*) (a))
-#define outw(a,b) (*(volatile unsigned short*) (b) = (a))
-
-static inline void udelay(unsigned usecs)
-{
- unsigned stop = USEC_TIMER + usecs;
- while (TIME_BEFORE(USEC_TIMER, stop));
-}
-
-#endif /* SYSTEM_TARGET_H */
+/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: system-target.h 28791 2010-12-11 09:39:33Z Buschel $ + * + * Copyright (C) 2007 by Dave Chapman + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef SYSTEM_TARGET_H +#define SYSTEM_TARGET_H + +#include "system-arm.h" +#include "mmu-arm.h" + +#define CPUFREQ_SLEEP 32768 +#define CPUFREQ_MAX 216000000 +#define CPUFREQ_DEFAULT 108000000 +#define CPUFREQ_NORMAL 108000000 + +#define STORAGE_WANTS_ALIGN + +#define inl(a) (*(volatile unsigned long *) (a)) +#define outl(a,b) (*(volatile unsigned long *) (b) = (a)) +#define inb(a) (*(volatile unsigned char *) (a)) +#define outb(a,b) (*(volatile unsigned char *) (b) = (a)) +#define inw(a) (*(volatile unsigned short*) (a)) +#define outw(a,b) (*(volatile unsigned short*) (b) = (a)) + +static inline void udelay(unsigned usecs) +{ + unsigned stop = USEC_TIMER + usecs; + while (TIME_BEFORE(USEC_TIMER, stop)); +} + +#endif /* SYSTEM_TARGET_H */ diff --git a/firmware/target/arm/s5l8702/timer-s5l8702.c b/firmware/target/arm/s5l8702/timer-s5l8702.c index fb56a9f..61d4d59 100644 --- a/firmware/target/arm/s5l8702/timer-s5l8702.c +++ b/firmware/target/arm/s5l8702/timer-s5l8702.c @@ -1,94 +1,94 @@ -/***************************************************************************
-* __________ __ ___.
-* Open \______ \ ____ ____ | | _\_ |__ _______ ___
-* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
-* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
-* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
-* \/ \/ \/ \/ \/
-* $Id: timer-s5l8700.c 23103 2009-10-11 11:35:14Z theseven $
-*
-* Copyright (C) 2009 Bertrik Sikken
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-* KIND, either express or implied.
-*
-****************************************************************************/
-
-#include "config.h"
-
-#include "inttypes.h"
-#include "s5l8702.h"
-#include "system.h"
-#include "timer.h"
-
-//TODO: This needs calibration once we figure out the clocking
-
-void INT_TIMERC(void)
-{
- /* clear interrupt */
- TCCON = TCCON;
-
- if (pfn_timer != NULL) {
- pfn_timer();
- }
-}
-
-bool timer_set(long cycles, bool start)
-{
- static const int cs_table[] = {1, 2, 4, 6};
- int prescale, cs;
- long count;
-
- /* stop and clear timer */
- TCCMD = (1 << 1); /* TD_CLR */
-
- /* optionally unregister any previously registered timer user */
- if (start) {
- if (pfn_unregister != NULL) {
- pfn_unregister();
- pfn_unregister = NULL;
- }
- }
-
- /* scale the count down with the clock select */
- for (cs = 0; cs < 4; cs++) {
- count = cycles >> cs_table[cs];
- if ((count < 65536) || (cs == 3)) {
- break;
- }
- }
-
- /* scale the count down with the prescaler */
- prescale = 1;
- while (count >= 65536) {
- count >>= 1;
- prescale <<= 1;
- }
-
- /* configure timer */
- TCCON = (1 << 12) | /* TD_INT0_EN */
- (cs << 8) | /* TS_CS */
- (0 << 4); /* TD_MODE_SEL, 0 = interval mode */
- TCPRE = prescale - 1;
- TCDATA0 = count;
- TCCMD = (1 << 0); /* TD_ENABLE */
-
- return true;
-}
-
-bool timer_start(void)
-{
- TCCMD = (1 << 0); /* TD_ENABLE */
- return true;
-}
-
-void timer_stop(void)
-{
- TCCMD = (0 << 0); /* TD_ENABLE */
-}
-
+/*************************************************************************** +* __________ __ ___. +* Open \______ \ ____ ____ | | _\_ |__ _______ ___ +* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +* \/ \/ \/ \/ \/ +* $Id: timer-s5l8700.c 23103 2009-10-11 11:35:14Z theseven $ +* +* Copyright (C) 2009 Bertrik Sikken +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +* KIND, either express or implied. +* +****************************************************************************/ + +#include "config.h" + +#include "inttypes.h" +#include "s5l8702.h" +#include "system.h" +#include "timer.h" + +//TODO: This needs calibration once we figure out the clocking + +void INT_TIMERC(void) +{ + /* clear interrupt */ + TCCON = TCCON; + + if (pfn_timer != NULL) { + pfn_timer(); + } +} + +bool timer_set(long cycles, bool start) +{ + static const int cs_table[] = {1, 2, 4, 6}; + int prescale, cs; + long count; + + /* stop and clear timer */ + TCCMD = (1 << 1); /* TD_CLR */ + + /* optionally unregister any previously registered timer user */ + if (start) { + if (pfn_unregister != NULL) { + pfn_unregister(); + pfn_unregister = NULL; + } + } + + /* scale the count down with the clock select */ + for (cs = 0; cs < 4; cs++) { + count = cycles >> cs_table[cs]; + if ((count < 65536) || (cs == 3)) { + break; + } + } + + /* scale the count down with the prescaler */ + prescale = 1; + while (count >= 65536) { + count >>= 1; + prescale <<= 1; + } + + /* configure timer */ + TCCON = (1 << 12) | /* TD_INT0_EN */ + (cs << 8) | /* TS_CS */ + (0 << 4); /* TD_MODE_SEL, 0 = interval mode */ + TCPRE = prescale - 1; + TCDATA0 = count; + TCCMD = (1 << 0); /* TD_ENABLE */ + + return true; +} + +bool timer_start(void) +{ + TCCMD = (1 << 0); /* TD_ENABLE */ + return true; +} + +void timer_stop(void) +{ + TCCMD = (0 << 0); /* TD_ENABLE */ +} + diff --git a/firmware/target/sh/archos/mascodec-archos.c b/firmware/target/sh/archos/mascodec-archos.c index 3f93216..1eb6e10 100644 --- a/firmware/target/sh/archos/mascodec-archos.c +++ b/firmware/target/sh/archos/mascodec-archos.c @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: mas.c 18807 2008-10-14 11:12:20Z zagor $ + * $Id$ * * Copyright (C) 2002 by Linus Nielsen Feltzing * diff --git a/rbutil/e200rpatcher/e200rpatcher.rc b/rbutil/e200rpatcher/e200rpatcher.rc index dae43bc..4d80442 100644 --- a/rbutil/e200rpatcher/e200rpatcher.rc +++ b/rbutil/e200rpatcher/e200rpatcher.rc @@ -1 +1 @@ -1 24 MOVEABLE PURE "e200rpatcher.manifest"
+1 24 MOVEABLE PURE "e200rpatcher.manifest" diff --git a/rbutil/ipodpatcher/ipodpatcher.rc b/rbutil/ipodpatcher/ipodpatcher.rc index 368826e..e440b51 100644 --- a/rbutil/ipodpatcher/ipodpatcher.rc +++ b/rbutil/ipodpatcher/ipodpatcher.rc @@ -1 +1 @@ -1 24 MOVEABLE PURE "ipodpatcher.manifest"
+1 24 MOVEABLE PURE "ipodpatcher.manifest" diff --git a/rbutil/sansapatcher/sansapatcher.rc b/rbutil/sansapatcher/sansapatcher.rc index 7040637..26bb8fe 100644 --- a/rbutil/sansapatcher/sansapatcher.rc +++ b/rbutil/sansapatcher/sansapatcher.rc @@ -1 +1 @@ -1 24 MOVEABLE PURE "sansapatcher.manifest"
+1 24 MOVEABLE PURE "sansapatcher.manifest" diff --git a/utils/MTP/sendfirm.manifest b/utils/MTP/sendfirm.manifest index 324c707..307b6c2 100644 --- a/utils/MTP/sendfirm.manifest +++ b/utils/MTP/sendfirm.manifest @@ -1,8 +1,8 @@ -<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
- <dependency>
- <dependentAssembly>
- <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
- </dependentAssembly>
- </dependency>
-</assembly>
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?> +<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> + <dependency> + <dependentAssembly> + <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> + </dependentAssembly> + </dependency> +</assembly> diff --git a/utils/tcctool/tcctool-windows.txt b/utils/tcctool/tcctool-windows.txt index d116bfe..f19e2b0 100644 --- a/utils/tcctool/tcctool-windows.txt +++ b/utils/tcctool/tcctool-windows.txt @@ -1,31 +1,31 @@ -tcctool for Windows
--------------------
-
-Installation
-------------
-
-When you first attach your device in USB boot mode to your computer,
-Windows should display the Found New Hardware Wizard.
-
-If this doesn't appear, and if you have previously used a firmware
-recovery tool with your device, you will need to uninstall the USB
-driver used by that application.
-
-Go into Control Panel -> System -> Hardware -> Device Manager, then
-click on Universal Serial Bus Controllers, look for something like
-"Telechips TCC77x VTC USB Driver", right-click on it and select
-Uninstall.
-
-After doing this, disconnect and reconnect your device and the Found
-New Hardware Wizard should appear.
-
-Select "No, not this time" to the question about connecting to Windows
-Update, and select "Install from a list or specific location
-(Advanced)" on the next screen.
-
-On the next screen, select "Search for the best driver in these
-locations", unselect "Search removable media", select "Include this
-location in the search:" and browse to the tcctool-driver-win32
-folder.
-
-You should now be able to run tcctool.exe
+tcctool for Windows +------------------- + +Installation +------------ + +When you first attach your device in USB boot mode to your computer, +Windows should display the Found New Hardware Wizard. + +If this doesn't appear, and if you have previously used a firmware +recovery tool with your device, you will need to uninstall the USB +driver used by that application. + +Go into Control Panel -> System -> Hardware -> Device Manager, then +click on Universal Serial Bus Controllers, look for something like +"Telechips TCC77x VTC USB Driver", right-click on it and select +Uninstall. + +After doing this, disconnect and reconnect your device and the Found +New Hardware Wizard should appear. + +Select "No, not this time" to the question about connecting to Windows +Update, and select "Install from a list or specific location +(Advanced)" on the next screen. + +On the next screen, select "Search for the best driver in these +locations", unselect "Search removable media", select "Include this +location in the search:" and browse to the tcctool-driver-win32 +folder. + +You should now be able to run tcctool.exe diff --git a/utils/themeeditor/qtfindreplacedialog/findreplace_global.h b/utils/themeeditor/qtfindreplacedialog/findreplace_global.h index be71bff..8b4b2a8 100644 --- a/utils/themeeditor/qtfindreplacedialog/findreplace_global.h +++ b/utils/themeeditor/qtfindreplacedialog/findreplace_global.h @@ -1,21 +1,21 @@ -/*
- * Copyright (C) 2009 Lorenzo Bettini <http://www.lorenzobettini.it>
- * See COPYING file that comes with this distribution
- */
-
-#ifndef FINDREPLACE_GLOBAL_H
-#define FINDREPLACE_GLOBAL_H
-
-#include <QtCore/qglobal.h>
-
-#ifndef FINDREPLACE_NOLIB
-#if defined(FINDREPLACE_LIBRARY)
-# define FINDREPLACESHARED_EXPORT Q_DECL_EXPORT
-#else
-# define FINDREPLACESHARED_EXPORT Q_DECL_IMPORT
-#endif
-#else
-#define FINDREPLACESHARED_EXPORT
-#endif
-
-#endif // FINDREPLACE_GLOBAL_H
+/* + * Copyright (C) 2009 Lorenzo Bettini <http://www.lorenzobettini.it> + * See COPYING file that comes with this distribution + */ + +#ifndef FINDREPLACE_GLOBAL_H +#define FINDREPLACE_GLOBAL_H + +#include <QtCore/qglobal.h> + +#ifndef FINDREPLACE_NOLIB +#if defined(FINDREPLACE_LIBRARY) +# define FINDREPLACESHARED_EXPORT Q_DECL_EXPORT +#else +# define FINDREPLACESHARED_EXPORT Q_DECL_IMPORT +#endif +#else +#define FINDREPLACESHARED_EXPORT +#endif + +#endif // FINDREPLACE_GLOBAL_H diff --git a/utils/themeeditor/qtfindreplacedialog/findreplacedialog.ui b/utils/themeeditor/qtfindreplacedialog/findreplacedialog.ui index 74984b3..3bc837e 100644 --- a/utils/themeeditor/qtfindreplacedialog/findreplacedialog.ui +++ b/utils/themeeditor/qtfindreplacedialog/findreplacedialog.ui @@ -1,32 +1,32 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>FindReplaceDialog</class>
- <widget class="QDialog" name="FindReplaceDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>342</width>
- <height>140</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Find/Replace</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="FindReplaceForm" name="findReplaceForm" native="true"/>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>FindReplaceForm</class>
- <extends>QWidget</extends>
- <header location="global">findreplaceform.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
+<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>FindReplaceDialog</class> + <widget class="QDialog" name="FindReplaceDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>342</width> + <height>140</height> + </rect> + </property> + <property name="windowTitle"> + <string>Find/Replace</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="FindReplaceForm" name="findReplaceForm" native="true"/> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>FindReplaceForm</class> + <extends>QWidget</extends> + <header location="global">findreplaceform.h</header> + <container>1</container> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/utils/themeeditor/qtfindreplacedialog/findreplaceform.ui b/utils/themeeditor/qtfindreplacedialog/findreplaceform.ui index acc055c..a68e120 100644 --- a/utils/themeeditor/qtfindreplacedialog/findreplaceform.ui +++ b/utils/themeeditor/qtfindreplacedialog/findreplaceform.ui @@ -1,204 +1,204 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>FindReplaceForm</class>
- <widget class="QWidget" name="FindReplaceForm">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>483</width>
- <height>288</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>&Find:</string>
- </property>
- <property name="buddy">
- <cstring>textToFind</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="textToFind"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="replaceLabel">
- <property name="text">
- <string>R&eplace with:</string>
- </property>
- <property name="buddy">
- <cstring>textToReplace</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="textToReplace"/>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="errorLabel">
- <property name="text">
- <string>errorLabel</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>D&irection</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QRadioButton" name="downRadioButton">
- <property name="text">
- <string>&Down</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="upRadioButton">
- <property name="text">
- <string>&Up</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>&Options</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <widget class="QCheckBox" name="caseCheckBox">
- <property name="text">
- <string>&Case sensitive</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="wholeCheckBox">
- <property name="text">
- <string>&Whole words only</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="regexCheckBox">
- <property name="toolTip">
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">whether the text to search should be interpreted as a regular expression.</p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may want to take a look at the syntax of regular expressions:</p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://doc.trolltech.com/qregexp.html"><span style=" text-decoration: underline; color:#0000ff;">http://doc.trolltech.com/qregexp.html</span></a></p></body></html></string>
- </property>
- <property name="text">
- <string>R&egular Expression</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item row="0" column="1">
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="leftMargin">
- <number>10</number>
- </property>
- <item>
- <widget class="QPushButton" name="findButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&Find</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="closeButton">
- <property name="text">
- <string>&Close</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="replaceButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&Replace</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="replaceAllButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Replace &All</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <tabstops>
- <tabstop>textToFind</tabstop>
- <tabstop>textToReplace</tabstop>
- <tabstop>downRadioButton</tabstop>
- <tabstop>upRadioButton</tabstop>
- <tabstop>caseCheckBox</tabstop>
- <tabstop>wholeCheckBox</tabstop>
- <tabstop>regexCheckBox</tabstop>
- <tabstop>findButton</tabstop>
- <tabstop>closeButton</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
+<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>FindReplaceForm</class> + <widget class="QWidget" name="FindReplaceForm"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>483</width> + <height>288</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>&Find:</string> + </property> + <property name="buddy"> + <cstring>textToFind</cstring> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLineEdit" name="textToFind"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="replaceLabel"> + <property name="text"> + <string>R&eplace with:</string> + </property> + <property name="buddy"> + <cstring>textToReplace</cstring> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="textToReplace"/> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="errorLabel"> + <property name="text"> + <string>errorLabel</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>D&irection</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QRadioButton" name="downRadioButton"> + <property name="text"> + <string>&Down</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="upRadioButton"> + <property name="text"> + <string>&Up</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string>&Options</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QCheckBox" name="caseCheckBox"> + <property name="text"> + <string>&Case sensitive</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="wholeCheckBox"> + <property name="text"> + <string>&Whole words only</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="regexCheckBox"> + <property name="toolTip"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">whether the text to search should be interpreted as a regular expression.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may want to take a look at the syntax of regular expressions:</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://doc.trolltech.com/qregexp.html"><span style=" text-decoration: underline; color:#0000ff;">http://doc.trolltech.com/qregexp.html</span></a></p></body></html></string> + </property> + <property name="text"> + <string>R&egular Expression</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item row="0" column="1"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>10</number> + </property> + <item> + <widget class="QPushButton" name="findButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Find</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="closeButton"> + <property name="text"> + <string>&Close</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="replaceButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Replace</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="replaceAllButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Replace &All</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + <tabstops> + <tabstop>textToFind</tabstop> + <tabstop>textToReplace</tabstop> + <tabstop>downRadioButton</tabstop> + <tabstop>upRadioButton</tabstop> + <tabstop>caseCheckBox</tabstop> + <tabstop>wholeCheckBox</tabstop> + <tabstop>regexCheckBox</tabstop> + <tabstop>findButton</tabstop> + <tabstop>closeButton</tabstop> + </tabstops> + <resources/> + <connections/> +</ui> diff --git a/utils/themeeditor/themeeditor.rc b/utils/themeeditor/themeeditor.rc index 7d588cb..6272b35 100644 --- a/utils/themeeditor/themeeditor.rc +++ b/utils/themeeditor/themeeditor.rc @@ -1 +1 @@ -EDITOR_ICON ICON DISCARDABLE "resources/windowicon.ico"
+EDITOR_ICON ICON DISCARDABLE "resources/windowicon.ico" |