Skip to content

Commit 61569a8

Browse files
committed
hardware: Fix Zorro heuristics for fast Amigas.
identify.library might not recognize Amigas with 68060 correctly, so instead of basing Zorro II/III distinction on the model detected, base it on the identifyable custom chips: - Gary + no Ramsey: A500/2000 -> Zorro II - Ramsey: A3000/A4000 -> Zorro III
1 parent 2f24b73 commit 61569a8

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

src/hardware.c

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,32 @@ void detect_system_chips(void)
415415
return;
416416
}
417417

418-
/* Try to detect based on system type */
418+
/* Detect Zorro capability based on chipset presence:
419+
* - Ramsey (memory controller) indicates A3000/A4000 = Zorro III
420+
* - Gary without Ramsey indicates A500/A2000 = Zorro II
421+
* This is more reliable than system type detection which can fail
422+
* with CPU upgrades (e.g., 68060)
423+
*/
424+
if (hw_info.ramsey_rev != 0) {
425+
/* A3000/A4000 have Ramsey - these have Zorro III slots */
426+
hw_info.has_zorro_slots = TRUE;
427+
snprintf(hw_info.card_slot_string, sizeof(hw_info.card_slot_string),
428+
"%s", get_string(MSG_ZORRO_III));
429+
return;
430+
}
431+
432+
if (hw_info.gary_rev != 0) {
433+
/* A500/A2000 have Gary but no Ramsey - these have Zorro II slots */
434+
hw_info.has_zorro_slots = TRUE;
435+
snprintf(hw_info.card_slot_string, sizeof(hw_info.card_slot_string),
436+
"%s", get_string(MSG_ZORRO_II));
437+
return;
438+
}
439+
440+
/* Fall back to system type detection for edge cases */
419441
{
420442
ULONG system_num = IdHardwareNum(IDHW_SYSTEM, NULL);
421443

422-
/* A500/A2000/A3000/A4000 have Zorro slots */
423-
/* A600/A1200 have PCMCIA slots */
424-
/* This is a simplification - actual detection would need more work */
425444
switch (system_num) {
426445
case IDSYS_AMIGA600:
427446
case IDSYS_AMIGA1200:
@@ -434,8 +453,7 @@ void detect_system_chips(void)
434453
hw_info.has_zorro_slots = TRUE;
435454
snprintf(hw_info.card_slot_string, sizeof(hw_info.card_slot_string),
436455
"%s", get_string(MSG_ZORRO_II));
437-
break;
438-
456+
break;
439457
case IDSYS_AMIGA3000:
440458
case IDSYS_AMIGA4000:
441459
hw_info.has_zorro_slots = TRUE;

0 commit comments

Comments
 (0)