comparison blastem.c @ 559:6b248602ab84

blastem builds and almost works on OS X now
author Mike Pavone <pavone@retrodev.com>
date Tue, 17 Jun 2014 01:50:29 -0400
parents dc9f178085a0
children 7ed1dbb48f61
comparison
equal deleted inserted replaced
558:dc9f178085a0 559:6b248602ab84
381 m68k_context * vdp_port_write_b(uint32_t vdp_port, m68k_context * context, uint8_t value) 381 m68k_context * vdp_port_write_b(uint32_t vdp_port, m68k_context * context, uint8_t value)
382 { 382 {
383 return vdp_port_write(vdp_port, context, vdp_port < 0x10 ? value | value << 8 : ((vdp_port & 1) ? value : 0)); 383 return vdp_port_write(vdp_port, context, vdp_port < 0x10 ? value | value << 8 : ((vdp_port & 1) ? value : 0));
384 } 384 }
385 385
386 z80_context * z80_vdp_port_write(uint16_t vdp_port, z80_context * context, uint8_t value) asm("z80_vdp_port_write");
386 z80_context * z80_vdp_port_write(uint16_t vdp_port, z80_context * context, uint8_t value) 387 z80_context * z80_vdp_port_write(uint16_t vdp_port, z80_context * context, uint8_t value)
387 { 388 {
388 genesis_context * gen = context->system; 389 genesis_context * gen = context->system;
389 if (vdp_port & 0xE0) { 390 if (vdp_port & 0xE0) {
390 printf("machine freeze due to write to Z80 address %X\n", 0x7F00 | vdp_port); 391 printf("machine freeze due to write to Z80 address %X\n", 0x7F00 | vdp_port);
672 value <<= 8; 673 value <<= 8;
673 } 674 }
674 return value; 675 return value;
675 } 676 }
676 677
678 extern z80_context * z80_write_ym(uint16_t location, z80_context * context, uint8_t value) asm("z80_write_ym");
677 z80_context * z80_write_ym(uint16_t location, z80_context * context, uint8_t value) 679 z80_context * z80_write_ym(uint16_t location, z80_context * context, uint8_t value)
678 { 680 {
679 genesis_context * gen = context->system; 681 genesis_context * gen = context->system;
680 sync_sound(gen, context->current_cycle * MCLKS_PER_Z80); 682 sync_sound(gen, context->current_cycle * MCLKS_PER_Z80);
681 if (location & 1) { 683 if (location & 1) {
686 ym_address_write_part1(gen->ym, value); 688 ym_address_write_part1(gen->ym, value);
687 } 689 }
688 return context; 690 return context;
689 } 691 }
690 692
693 extern uint8_t z80_read_ym(uint16_t location, z80_context * context) asm("z80_read_ym");
691 uint8_t z80_read_ym(uint16_t location, z80_context * context) 694 uint8_t z80_read_ym(uint16_t location, z80_context * context)
692 { 695 {
693 genesis_context * gen = context->system; 696 genesis_context * gen = context->system;
694 sync_sound(gen, context->current_cycle * MCLKS_PER_Z80); 697 sync_sound(gen, context->current_cycle * MCLKS_PER_Z80);
695 return ym_read_status(gen->ym); 698 return ym_read_status(gen->ym);