mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-05-02 22:43:45 +00:00
[FIRMWARE] Atari ST ikbd timing, fixes Bubble Bobble. Archie floppy and sound progress.
This commit is contained in:
38
ikbd.c
38
ikbd.c
@@ -504,24 +504,30 @@ void ikbd_poll(void) {
|
||||
ikbd_timer = 0;
|
||||
}
|
||||
|
||||
if(tx_queue[rptr] & 0x8000) {
|
||||
// rate limit tx to 1khz
|
||||
static unsigned long rtimer = 0;
|
||||
if(CheckTimer(rtimer)) {
|
||||
rtimer = GetTimer(1);
|
||||
|
||||
if(tx_queue[rptr] & 0x8000) {
|
||||
|
||||
// request to start timer?
|
||||
if(tx_queue[rptr] & 0x8000)
|
||||
ikbd_timer = GetTimer(tx_queue[rptr] & 0x3fff);
|
||||
|
||||
rptr = (rptr+1)&(QUEUE_LEN-1);
|
||||
return;
|
||||
}
|
||||
|
||||
// transmit data from queue
|
||||
spi_uio_cmd_cont(UIO_IKBD_OUT);
|
||||
spi8(tx_queue[rptr]);
|
||||
DisableIO();
|
||||
|
||||
ikbd.tx_cnt++;
|
||||
|
||||
// request to start timer?
|
||||
if(tx_queue[rptr] & 0x8000)
|
||||
ikbd_timer = GetTimer(tx_queue[rptr] & 0x3fff);
|
||||
|
||||
rptr = (rptr+1)&(QUEUE_LEN-1);
|
||||
return;
|
||||
rptr = (rptr+1)&(QUEUE_LEN-1);
|
||||
}
|
||||
|
||||
// transmit data from queue
|
||||
spi_uio_cmd_cont(UIO_IKBD_OUT);
|
||||
spi8(tx_queue[rptr]);
|
||||
DisableIO();
|
||||
|
||||
ikbd.tx_cnt++;
|
||||
|
||||
rptr = (rptr+1)&(QUEUE_LEN-1);
|
||||
}
|
||||
|
||||
// called from external parts to report joystick states
|
||||
|
||||
@@ -437,8 +437,8 @@ const unsigned short usb2archie[] = {
|
||||
0x1c, // 2e: =
|
||||
0x31, // 2f: [
|
||||
0x32, // 30: ]
|
||||
0x33, // 31: backslash
|
||||
MISS, // 32: Europe 1
|
||||
0x33, // 31: backslash (only on us keyboards)
|
||||
0x33, // 32: Europe 1 (only on international kbds)
|
||||
0x45, // 33: ;
|
||||
0x46, // 34: '
|
||||
0x10, // 35: `
|
||||
|
||||
@@ -576,7 +576,7 @@ unsigned char user_io_8bit_set_status(unsigned char new_status, unsigned char ma
|
||||
|
||||
void user_io_poll() {
|
||||
|
||||
if(user_io_dip_switch1() && (core_type != CORE_TYPE_ARCHIE)) {
|
||||
if(user_io_dip_switch1()) {
|
||||
// check of core has changed from a good one to a not supported on
|
||||
// as this likely means that the user is reloading the core via jtag
|
||||
unsigned char ct;
|
||||
|
||||
Reference in New Issue
Block a user