mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-26 13:34:22 +01:00
Move linecount to c64
This commit is contained in:
parent
0209c7eb86
commit
8607e7827d
@ -199,6 +199,7 @@ public:
|
|||||||
int network_connection_type;
|
int network_connection_type;
|
||||||
Network *peer;
|
Network *peer;
|
||||||
TTF_Font *menu_font;
|
TTF_Font *menu_font;
|
||||||
|
int linecnt;
|
||||||
|
|
||||||
bool fake_key_sequence;
|
bool fake_key_sequence;
|
||||||
const char *fake_key_str;
|
const char *fake_key_str;
|
||||||
|
@ -43,6 +43,7 @@ void C64::c64_ctor1(void)
|
|||||||
joy_minx = joy_miny = 32767;
|
joy_minx = joy_miny = 32767;
|
||||||
joy_maxx = joy_maxy = -32768;
|
joy_maxx = joy_maxy = -32768;
|
||||||
#endif
|
#endif
|
||||||
|
this->linecnt = 0;
|
||||||
|
|
||||||
this->fake_key_sequence = false;
|
this->fake_key_sequence = false;
|
||||||
this->fake_key_index = 0;
|
this->fake_key_index = 0;
|
||||||
|
@ -405,8 +405,6 @@ void Network::EnqueueSound(uint32 linecnt_diff, uint8 adr, uint8 val)
|
|||||||
{
|
{
|
||||||
NetworkUpdateSoundInfo *cur = &this->sound_active[this->sound_head];
|
NetworkUpdateSoundInfo *cur = &this->sound_active[this->sound_head];
|
||||||
|
|
||||||
if (linecnt_diff > 400)
|
|
||||||
linecnt_diff = 400;
|
|
||||||
cur->adr = adr;
|
cur->adr = adr;
|
||||||
cur->val = val;
|
cur->val = val;
|
||||||
cur->delay_cycles = linecnt_diff;
|
cur->delay_cycles = linecnt_diff;
|
||||||
@ -461,6 +459,7 @@ void Network::FlushSound(void)
|
|||||||
InitNetworkUpdate(dst, SOUND_UPDATE, sizeof(NetworkUpdate) +
|
InitNetworkUpdate(dst, SOUND_UPDATE, sizeof(NetworkUpdate) +
|
||||||
sizeof(NetworkUpdateSound) + sizeof(NetworkUpdateSoundInfo) * snd->n_items);
|
sizeof(NetworkUpdateSound) + sizeof(NetworkUpdateSoundInfo) * snd->n_items);
|
||||||
this->AddNetworkUpdate(dst);
|
this->AddNetworkUpdate(dst);
|
||||||
|
this->sound_last_cycles = TheC64->linecnt;
|
||||||
|
|
||||||
bytes = 0;
|
bytes = 0;
|
||||||
}
|
}
|
||||||
|
@ -445,7 +445,6 @@ private:
|
|||||||
#if defined(__linux__) || defined(GEKKO)
|
#if defined(__linux__) || defined(GEKKO)
|
||||||
int devfd, sndbufsize, buffer_rate;
|
int devfd, sndbufsize, buffer_rate;
|
||||||
int16 *sound_buffer;
|
int16 *sound_buffer;
|
||||||
uint32 linecnt;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SUN
|
#ifdef SUN
|
||||||
@ -921,7 +920,7 @@ void DigitalRenderer::WriteRegister(uint16 adr, uint8 byte)
|
|||||||
|
|
||||||
if (TheC64) {
|
if (TheC64) {
|
||||||
if (TheC64->network_connection_type == MASTER)
|
if (TheC64->network_connection_type == MASTER)
|
||||||
TheC64->peer->RegisterSidWrite(this->linecnt, adr, byte);
|
TheC64->peer->RegisterSidWrite(TheC64->linecnt, adr, byte);
|
||||||
}
|
}
|
||||||
|
|
||||||
int v = adr/7; // Voice number
|
int v = adr/7; // Voice number
|
||||||
|
@ -47,7 +47,6 @@ void DigitalRenderer::init_sound(void)
|
|||||||
int arg;
|
int arg;
|
||||||
unsigned long format;
|
unsigned long format;
|
||||||
|
|
||||||
linecnt = 0;
|
|
||||||
ready = false;
|
ready = false;
|
||||||
devfd = open("/dev/dsp", O_WRONLY);
|
devfd = open("/dev/dsp", O_WRONLY);
|
||||||
if (devfd < 0)
|
if (devfd < 0)
|
||||||
@ -166,7 +165,7 @@ void DigitalRenderer::EmulateLine(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->PushVolume(volume);
|
this->PushVolume(volume);
|
||||||
this->linecnt++;
|
TheC64->linecnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user