comparison blastem.c @ 753:cee1275f5d08

Lame placeholder support for floating bus bits of IO hardware. Needs to be replaced with prefetch based values
author Michael Pavone <pavone@retrodev.com>
date Thu, 25 Jun 2015 09:02:42 -0700
parents 296ddfcf0d43
children bb60259e8edf
comparison
equal deleted inserted replaced
752:296ddfcf0d43 753:cee1275f5d08
641 value = 0xFF; 641 value = 0xFF;
642 } 642 }
643 } else { 643 } else {
644 if (location == 0x1100) { 644 if (location == 0x1100) {
645 value = z80_enabled ? !z80_get_busack(gen->z80, context->current_cycle) : !gen->z80->busack; 645 value = z80_enabled ? !z80_get_busack(gen->z80, context->current_cycle) : !gen->z80->busack;
646 //TODO: actual pre-fetch emulation
647 value |= 0x4E;
646 dprintf("Byte read of BUSREQ returned %d @ %d (reset: %d)\n", value, context->current_cycle, gen->z80->reset); 648 dprintf("Byte read of BUSREQ returned %d @ %d (reset: %d)\n", value, context->current_cycle, gen->z80->reset);
647 } else if (location == 0x1200) { 649 } else if (location == 0x1200) {
648 value = !gen->z80->reset; 650 value = !gen->z80->reset;
649 } else { 651 } else {
650 value = 0xFF; 652 value = 0xFF;
660 uint16_t value = io_read(location, context); 662 uint16_t value = io_read(location, context);
661 if (location < 0x10000 || (location & 0x1FFF) < 0x100) { 663 if (location < 0x10000 || (location & 0x1FFF) < 0x100) {
662 value = value | (value << 8); 664 value = value | (value << 8);
663 } else { 665 } else {
664 value <<= 8; 666 value <<= 8;
667 //TODO: actual pre-fetch emulation
668 value |= 0x73;
665 } 669 }
666 return value; 670 return value;
667 } 671 }
668 672
669 void * z80_write_ym(uint32_t location, void * vcontext, uint8_t value) 673 void * z80_write_ym(uint32_t location, void * vcontext, uint8_t value)