Mercurial > repos > blastem
comparison genesis.c @ 2433:2907c3312423
Fix byte reads of ADPCM ports. Fixes hangs in Sanchoume no Tama and Sailor Moon Sailor Stars - Tokimeki Party
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 08 Feb 2024 20:24:37 -0800 |
parents | 61c0bfe10887 |
children | 79a8cccb6ac1 |
comparison
equal
deleted
inserted
replaced
2432:18816c5c11d4 | 2433:2907c3312423 |
---|---|
1515 return gen->pico_page; | 1515 return gen->pico_page; |
1516 case 8: | 1516 case 8: |
1517 //printf("uPD7759 data read @ %u\n", m68k->current_cycle); | 1517 //printf("uPD7759 data read @ %u\n", m68k->current_cycle); |
1518 sync_sound_pico(gen, m68k->current_cycle); | 1518 sync_sound_pico(gen, m68k->current_cycle); |
1519 tmp = pico_pcm_data_read(gen->adpcm); | 1519 tmp = pico_pcm_data_read(gen->adpcm); |
1520 return (location & 1) ? tmp >> 8 : tmp; | 1520 return (location & 1) ? tmp : tmp >> 8; |
1521 case 9: | 1521 case 9: |
1522 //printf("uPD7759 contro/status read @ %u\n", m68k->current_cycle); | 1522 //printf("uPD7759 contro/status read @ %u\n", m68k->current_cycle); |
1523 sync_sound_pico(gen, m68k->current_cycle); | 1523 sync_sound_pico(gen, m68k->current_cycle); |
1524 tmp = pico_pcm_ctrl_read(gen->adpcm); | 1524 tmp = pico_pcm_ctrl_read(gen->adpcm); |
1525 return (location & 1) ? tmp >> 8 : tmp; | 1525 return (location & 1) ? tmp : tmp >> 8; |
1526 return 0; | 1526 return 0; |
1527 default: | 1527 default: |
1528 printf("Unknown Pico IO read %X @ %u\n", location, m68k->current_cycle); | 1528 printf("Unknown Pico IO read %X @ %u\n", location, m68k->current_cycle); |
1529 return 0xFF; | 1529 return 0xFF; |
1530 } | 1530 } |