From 92050b240e777d0319622c31e43e7ff2823858c4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 7 Jun 2017 20:41:21 +0300 Subject: [PATCH] Fixed Masoboshi crash. --- idecontrollers.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/idecontrollers.cpp b/idecontrollers.cpp index a4e6095f..447b4c6d 100644 --- a/idecontrollers.cpp +++ b/idecontrollers.cpp @@ -1702,24 +1702,20 @@ bool masoboshi_init(struct autoconfig_info *aci) if (!ide) return false; - ide->configured = 0; - ide->configured = 0; ide->bank = &ide_bank_generic; ide->type = MASOBOSHI_IDE; ide->rom_size = rom_size; - ide->mask = rom_size - 1; - ide->subtype = 0; - + ide->rom_mask = ide->mask = rom_size - 1; + ide->rom = rom; ide->subtype = aci->rc->subtype; + if (aci->rc && aci->rc->autoboot_disabled) memcpy(ide->acmemory, ide->rom + 0x100, sizeof ide->acmemory); else memcpy(ide->acmemory, ide->rom + 0x000, sizeof ide->acmemory); - memset(ide->acmemory, 0xff, sizeof ide->acmemory); - - aci->addrbank =ide->bank; + aci->addrbank = ide->bank; return true; } -- 2.47.3