|
9 | 9 | * See the file COPYING for more details, or visit <http://unlicense.org>. |
10 | 10 | */ |
11 | 11 |
|
12 | | -#if TARGET == TARGET_shugart || TARGET == TARGET_apple2 |
| 12 | +#if TARGET == TARGET_shugart |
13 | 13 |
|
14 | 14 | extern const struct image_handler adf_image_handler; |
15 | 15 | extern const struct image_handler atr_image_handler; |
@@ -68,6 +68,15 @@ const struct image_type image_type[] = { |
68 | 68 | { "", NULL } |
69 | 69 | }; |
70 | 70 |
|
| 71 | +#elif TARGET == TARGET_apple2 |
| 72 | + |
| 73 | +extern const struct image_handler hfe_image_handler; |
| 74 | + |
| 75 | +const struct image_type image_type[] = { |
| 76 | + { "hfe", &hfe_image_handler }, |
| 77 | + { "", NULL } |
| 78 | +}; |
| 79 | + |
71 | 80 | #elif TARGET == TARGET_quickdisk |
72 | 81 |
|
73 | 82 | extern const struct image_handler qd_image_handler; |
@@ -135,7 +144,7 @@ static bool_t try_handler(struct image *im, struct slot *slot, |
135 | 144 | return handler->open(im); |
136 | 145 | } |
137 | 146 |
|
138 | | -#if TARGET == TARGET_shugart || TARGET == TARGET_apple2 |
| 147 | +#if TARGET == TARGET_shugart |
139 | 148 |
|
140 | 149 | void image_open(struct image *im, struct slot *slot, DWORD *cltbl) |
141 | 150 | { |
@@ -200,6 +209,17 @@ void image_open(struct image *im, struct slot *slot, DWORD *cltbl) |
200 | 209 | F_die(FR_BAD_IMAGE); |
201 | 210 | } |
202 | 211 |
|
| 212 | +#elif TARGET == TARGET_apple2 |
| 213 | + |
| 214 | +void image_open(struct image *im, struct slot *slot, DWORD *cltbl) |
| 215 | +{ |
| 216 | + if (try_handler(im, slot, cltbl, &hfe_image_handler)) |
| 217 | + return; |
| 218 | + |
| 219 | + /* No handler found: bad image. */ |
| 220 | + F_die(FR_BAD_IMAGE); |
| 221 | +} |
| 222 | + |
203 | 223 | #elif TARGET == TARGET_quickdisk |
204 | 224 |
|
205 | 225 | void image_open(struct image *im, struct slot *slot, DWORD *cltbl) |
|
0 commit comments