| 2594 | } |
| 2595 | |
| 2596 | bool masoboshi_init(struct autoconfig_info *aci) |
| 2597 | { |
| 2598 | int rom_size = 65536; |
| 2599 | uae_u8 *rom = xcalloc(uae_u8, rom_size); |
| 2600 | memset(rom, 0xff, rom_size); |
| 2601 | |
| 2602 | load_rom_rc(aci->rc, ROMTYPE_MASOBOSHI, 32768, 0, rom, 65536, LOADROM_EVENONLY_ODDONE | LOADROM_FILL); |
| 2603 | ide_add_reset(); |
| 2604 | if (!aci->doinit) { |
| 2605 | if (aci->rc && aci->rc->autoboot_disabled) |
| 2606 | memcpy(aci->autoconfig_raw, rom + 0x100, sizeof aci->autoconfig_raw); |
| 2607 | else |
| 2608 | memcpy(aci->autoconfig_raw, rom + 0x000, sizeof aci->autoconfig_raw); |
| 2609 | xfree(rom); |
| 2610 | return true; |
| 2611 | } |
| 2612 | |
| 2613 | struct ide_board *ide = getide(aci); |
| 2614 | |
| 2615 | if (!ide) |
| 2616 | return false; |
| 2617 | |
| 2618 | ide->configured = 0; |
| 2619 | ide->bank = &ide_bank_generic; |
| 2620 | ide->type = MASOBOSHI_IDE; |
| 2621 | ide->rom_size = rom_size; |
| 2622 | ide->rom_mask = ide->mask = rom_size - 1; |
| 2623 | ide->rom = rom; |
| 2624 | ide->subtype = aci->rc->subtype; |
| 2625 | |
| 2626 | if (aci->rc && aci->rc->autoboot_disabled) |
| 2627 | memcpy(ide->acmemory, ide->rom + 0x100, sizeof ide->acmemory); |
| 2628 | else |
| 2629 | memcpy(ide->acmemory, ide->rom + 0x000, sizeof ide->acmemory); |
| 2630 | |
| 2631 | aci->addrbank = ide->bank; |
| 2632 | return true; |
| 2633 | } |
| 2634 | |
| 2635 | static void masoboshi_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc) |
| 2636 | { |
nothing calls this directly
no test coverage detected