- [CHG] zx_screen pinta t_state a t_state, per a que es vegen les ralles al carregar

- [FIX] Ja carrega blocs capçalera i blocs programa. Falla el següent...
This commit is contained in:
2024-04-21 21:53:34 +02:00
parent ddcb40b289
commit 9b603604e9
5 changed files with 144 additions and 60 deletions

View File

@@ -90,8 +90,8 @@ namespace zx_ula
void port_out(int port, int val)
{
border_color = val & 0x7;
mic = (val>>3)&0x1;
ear = (val>>4)&0x1;
mic = (val&0x08)==0;
ear = val&0x10;
//printf("EAR:%i MIC:%i\n", ear, mic);
}
@@ -111,6 +111,7 @@ namespace zx_ula
{
const uint16_t top = sound_pos < len ? sound_pos : len;
memcpy(stream, sound_buffer, top);
if (top<len) memchr(&stream[top], sound_buffer[top-1], len-top);
sound_pos=0;
}
@@ -133,8 +134,8 @@ namespace zx_ula
void sound_update(const uint8_t dt)
{
t_sound += dt;
if (t_sound>=400) {
t_sound-=400;
if (t_sound>=317) {
t_sound-=317;
sound_buffer[sound_pos++] = ear*128;
}
}