2013-07-31 22:25:37 +00:00
|
|
|
#include "defines.h"
|
2019-11-01 15:43:34 +00:00
|
|
|
#include "intl.h"
|
2013-07-31 22:25:37 +00:00
|
|
|
|
2019-11-01 14:33:24 +00:00
|
|
|
void covox_init() {
|
2013-07-31 22:25:37 +00:00
|
|
|
covox_val = 0;
|
|
|
|
covox_age = ~0;
|
|
|
|
}
|
|
|
|
|
2019-11-01 14:33:24 +00:00
|
|
|
int covox_read(c_addr addr, d_word *word)
|
2013-07-31 22:25:37 +00:00
|
|
|
{
|
|
|
|
*word = 0; /* pulldown */
|
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|
2019-11-01 14:33:24 +00:00
|
|
|
int covox_write(c_addr addr, d_word word)
|
2013-07-31 22:25:37 +00:00
|
|
|
{
|
|
|
|
covox_val = word & 0xFF;
|
|
|
|
covox_age = 0;
|
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|
2019-11-01 14:33:24 +00:00
|
|
|
int covox_bwrite(c_addr addr, d_byte byte) {
|
2013-07-31 22:25:37 +00:00
|
|
|
d_word offset = addr & 1;
|
|
|
|
if (offset == 0) {
|
|
|
|
covox_val = byte;
|
|
|
|
} else {
|
|
|
|
covox_val = 0;
|
|
|
|
}
|
|
|
|
covox_age = 0;
|
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|