| 2720 | static const uae_u8 adide_autoconfig[16] = { 0xd1, 0x02, 0x00, 0x00, 0x08, 0x17, 0x00, 0x00, 0x00, 0x00, ADIDE_ROM_OFFSET >> 8, ADIDE_ROM_OFFSET & 0xff }; |
| 2721 | |
| 2722 | bool adide_init(struct autoconfig_info *aci) |
| 2723 | { |
| 2724 | ide_add_reset(); |
| 2725 | if (!aci->doinit) { |
| 2726 | aci->autoconfigp = adide_autoconfig; |
| 2727 | return true; |
| 2728 | } |
| 2729 | struct ide_board *ide = getide(aci); |
| 2730 | |
| 2731 | ide->configured = 0; |
| 2732 | ide->keepautoconfig = false; |
| 2733 | ide->bank = &ide_bank_generic; |
| 2734 | ide->rom_size = 32768; |
| 2735 | ide->mask = 65536 - 1; |
| 2736 | |
| 2737 | memset(ide->acmemory, 0xff, sizeof ide->acmemory); |
| 2738 | |
| 2739 | ide->rom = xcalloc(uae_u8, ide->rom_size); |
| 2740 | memset(ide->rom, 0xff, ide->rom_size); |
| 2741 | ide->rom_mask = ide->rom_size - 1; |
| 2742 | if (!aci->rc->autoboot_disabled) { |
| 2743 | load_rom_rc(aci->rc, ROMTYPE_ADIDE, 16384, 0, ide->rom, 32768, LOADROM_EVENONLY_ODDONE | LOADROM_FILL); |
| 2744 | } |
| 2745 | for (int i = 0; i < 16; i++) { |
| 2746 | uae_u8 b = adide_autoconfig[i]; |
| 2747 | ew(ide, i * 4, b); |
| 2748 | } |
| 2749 | aci->addrbank = ide->bank; |
| 2750 | return true; |
| 2751 | } |
| 2752 | |
| 2753 | void adide_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc) |
| 2754 | { |
nothing calls this directly
no test coverage detected