High PC speaker frequencies treated as constant level.
Improved timing for port 0x61 writes.
This commit is contained in:
parent
22f20e3595
commit
b459fc9815
6 changed files with 19 additions and 0 deletions
|
|
@ -76,6 +76,9 @@ void keyboard_amstrad_write(uint16_t port, uint8_t val, void *priv)
|
|||
keyboard_amstrad.pb = val;
|
||||
ppi.pb = val;
|
||||
|
||||
timer_process();
|
||||
timer_update_outstanding();
|
||||
|
||||
speaker_gated = val & 1;
|
||||
speaker_enable = val & 2;
|
||||
if (speaker_enable)
|
||||
|
|
|
|||
|
|
@ -284,6 +284,10 @@ void keyboard_at_write(uint16_t port, uint8_t val, void *priv)
|
|||
|
||||
case 0x61:
|
||||
ppi.pb = val;
|
||||
|
||||
timer_process();
|
||||
timer_update_outstanding();
|
||||
|
||||
speaker_gated = val & 1;
|
||||
speaker_enable = val & 2;
|
||||
if (speaker_enable)
|
||||
|
|
|
|||
|
|
@ -144,6 +144,9 @@ void keyboard_olim24_write(uint16_t port, uint8_t val, void *priv)
|
|||
case 0x61:
|
||||
ppi.pb = val;
|
||||
|
||||
timer_process();
|
||||
timer_update_outstanding();
|
||||
|
||||
speaker_gated = val & 1;
|
||||
speaker_enable = val & 2;
|
||||
if (speaker_enable)
|
||||
|
|
|
|||
|
|
@ -124,6 +124,10 @@ void keyboard_pcjr_write(uint16_t port, uint8_t val, void *priv)
|
|||
|
||||
case 0x61:
|
||||
keyboard_pcjr.pb = val;
|
||||
|
||||
timer_process();
|
||||
timer_update_outstanding();
|
||||
|
||||
speaker_gated = val & 1;
|
||||
speaker_enable = val & 2;
|
||||
if (speaker_enable)
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ void keyboard_xt_write(uint16_t port, uint8_t val, void *priv)
|
|||
keyboard_xt.pb = val;
|
||||
ppi.pb = val;
|
||||
|
||||
timer_process();
|
||||
timer_update_outstanding();
|
||||
|
||||
speaker_gated = val & 1;
|
||||
speaker_enable = val & 2;
|
||||
if (speaker_enable)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ static void speaker_poll(void *p)
|
|||
{
|
||||
if (!pit.m[2] || pit.m[2]==4)
|
||||
speaker_buffer[speaker_pos] = speakval;
|
||||
else if (pit.l[2] < 0x40)
|
||||
speaker_buffer[speaker_pos] = 0xa00;
|
||||
else
|
||||
speaker_buffer[speaker_pos] = speakon ? 0x1400 : 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue