mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2025-02-17 04:46:20 +01:00
More debugging, allow writes from the client
This commit is contained in:
parent
f1bd3a86f4
commit
0209c7eb86
@ -330,6 +330,7 @@ inline uint16 MOS6510::read_word(uint16 adr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern C64 *TheC64;
|
||||||
/*
|
/*
|
||||||
* Write a byte to I/O space
|
* Write a byte to I/O space
|
||||||
*/
|
*/
|
||||||
@ -352,7 +353,8 @@ inline void MOS6510::write_byte_io(uint16 adr, uint8 byte)
|
|||||||
case 0x5:
|
case 0x5:
|
||||||
case 0x6:
|
case 0x6:
|
||||||
case 0x7:
|
case 0x7:
|
||||||
TheSID->WriteRegister(adr & 0x1f, byte);
|
if (TheC64->network_connection_type != CLIENT)
|
||||||
|
TheSID->WriteRegister(adr & 0x1f, byte);
|
||||||
return;
|
return;
|
||||||
case 0x8: // Color RAM
|
case 0x8: // Color RAM
|
||||||
case 0x9:
|
case 0x9:
|
||||||
|
@ -405,8 +405,8 @@ 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 > 255)
|
if (linecnt_diff > 400)
|
||||||
linecnt_diff = 255;
|
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;
|
||||||
@ -426,7 +426,7 @@ void Network::RegisterSidWrite(uint32 linecnt, uint8 adr, uint8 val)
|
|||||||
{
|
{
|
||||||
this->EnqueueSound(linecnt - this->sound_last_cycles, adr, 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 */
|
/* Update the cycle counter */
|
||||||
sound_last_cycles = linecnt;
|
sound_last_cycles = linecnt;
|
||||||
bytes += sizeof(NetworkUpdateSound);
|
bytes += sizeof(NetworkUpdateSound);
|
||||||
|
@ -922,8 +922,6 @@ 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(this->linecnt, adr, byte);
|
||||||
else if (TheC64->network_connection_type == CLIENT)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int v = adr/7; // Voice number
|
int v = adr/7; // Voice number
|
||||||
|
@ -152,8 +152,6 @@ void DigitalRenderer::EmulateLine(void)
|
|||||||
|
|
||||||
if (!cur) {
|
if (!cur) {
|
||||||
cur = TheC64->peer->DequeueSound();
|
cur = TheC64->peer->DequeueSound();
|
||||||
if (cur)
|
|
||||||
printf("delaying: %d\n", cur->delay_cycles);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cur) {
|
while (cur) {
|
||||||
@ -165,8 +163,6 @@ void DigitalRenderer::EmulateLine(void)
|
|||||||
printf("Writing %02x:%02x\n", cur->adr, cur->val);
|
printf("Writing %02x:%02x\n", cur->adr, cur->val);
|
||||||
this->WriteRegister(cur->adr, cur->val);
|
this->WriteRegister(cur->adr, cur->val);
|
||||||
cur = TheC64->peer->DequeueSound();
|
cur = TheC64->peer->DequeueSound();
|
||||||
if (cur)
|
|
||||||
printf("delay 2: %d\n", cur->delay_cycles);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->PushVolume(volume);
|
this->PushVolume(volume);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user