diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-02-26 22:40:37 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-02-26 22:40:37 -0800 |
commit | 961cf431bb75e7a25805103da6efa3f41baf01c9 (patch) | |
tree | d870d7e769a5e9387dbd7e41d8e3f393f8fe59c8 /genesis.c | |
parent | 94c3e706af264bad799db8cc51a51f86356c6481 (diff) |
Implement selectable YM2612/YM3834 invalid status port behavior
Diffstat (limited to 'genesis.c')
-rw-r--r-- | genesis.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -875,7 +875,7 @@ static uint8_t io_read(uint32_t location, m68k_context * context) value = gen->zram[location & 0x1FFF]; } else if (location < 0x6000) { sync_sound(gen, context->current_cycle); - value = ym_read_status(gen->ym, context->current_cycle); + value = ym_read_status(gen->ym, context->current_cycle, location); } else { value = 0xFF; } @@ -988,7 +988,7 @@ static uint8_t z80_read_ym(uint32_t location, void * vcontext) z80_context * context = vcontext; genesis_context * gen = context->system; sync_sound(gen, context->Z80_CYCLE); - return ym_read_status(gen->ym, context->Z80_CYCLE); + return ym_read_status(gen->ym, context->Z80_CYCLE, location); } static uint8_t z80_read_bank(uint32_t location, void * vcontext) @@ -1420,6 +1420,10 @@ genesis_context *alloc_init_genesis(rom_info *rom, void *main_rom, void *lock_on render_set_video_standard((gen->version_reg & HZ50) ? VID_PAL : VID_NTSC); gen->ym = malloc(sizeof(ym2612_context)); + char *fm = tern_find_ptr_default(model, "fm", "discrete 2612"); + if (!strcmp(fm + strlen(fm) -4, "3834")) { + system_opts |= YM_OPT_3834; + } ym_init(gen->ym, gen->master_clock, MCLKS_PER_YM, system_opts); gen->psg = malloc(sizeof(psg_context)); |