More debugging, allow writes from the client

This commit is contained in:
simon.kagstrom 2009-11-07 10:03:49 +00:00
parent f1bd3a86f4
commit 0209c7eb86
4 changed files with 6 additions and 10 deletions

View File

@ -330,6 +330,7 @@ inline uint16 MOS6510::read_word(uint16 adr)
}
extern C64 *TheC64;
/*
* Write a byte to I/O space
*/
@ -352,7 +353,8 @@ inline void MOS6510::write_byte_io(uint16 adr, uint8 byte)
case 0x5:
case 0x6:
case 0x7:
TheSID->WriteRegister(adr & 0x1f, byte);
if (TheC64->network_connection_type != CLIENT)
TheSID->WriteRegister(adr & 0x1f, byte);
return;
case 0x8: // Color RAM
case 0x9:

View File

@ -405,8 +405,8 @@ void Network::EnqueueSound(uint32 linecnt_diff, uint8 adr, uint8 val)
{
NetworkUpdateSoundInfo *cur = &this->sound_active[this->sound_head];
if (linecnt_diff > 255)
linecnt_diff = 255;
if (linecnt_diff > 400)
linecnt_diff = 400;
cur->adr = adr;
cur->val = val;
cur->delay_cycles = linecnt_diff;
@ -426,7 +426,7 @@ void Network::RegisterSidWrite(uint32 linecnt, uint8 adr, uint8 val)
{
this->EnqueueSound(linecnt - this->sound_last_cycles, adr, val);
printf("Enqueuing write: %d\n", linecnt - this->sound_last_cycles);
printf("Enqueuing write: %04d:%02x:%02x\n", linecnt - this->sound_last_cycles, adr, val);
/* Update the cycle counter */
sound_last_cycles = linecnt;
bytes += sizeof(NetworkUpdateSound);

View File

@ -922,8 +922,6 @@ void DigitalRenderer::WriteRegister(uint16 adr, uint8 byte)
if (TheC64) {
if (TheC64->network_connection_type == MASTER)
TheC64->peer->RegisterSidWrite(this->linecnt, adr, byte);
else if (TheC64->network_connection_type == CLIENT)
return;
}
int v = adr/7; // Voice number

View File

@ -152,8 +152,6 @@ void DigitalRenderer::EmulateLine(void)
if (!cur) {
cur = TheC64->peer->DequeueSound();
if (cur)
printf("delaying: %d\n", cur->delay_cycles);
}
while (cur) {
@ -165,8 +163,6 @@ void DigitalRenderer::EmulateLine(void)
printf("Writing %02x:%02x\n", cur->adr, cur->val);
this->WriteRegister(cur->adr, cur->val);
cur = TheC64->peer->DequeueSound();
if (cur)
printf("delay 2: %d\n", cur->delay_cycles);
}
}
this->PushVolume(volume);