Skip to content

Commit c79be06

Browse files
committed
Zoom disabled / Dat added Boot Menu / Fix for SD->CF
1 parent bf97a61 commit c79be06

8 files changed

Lines changed: 67 additions & 56 deletions

File tree

arch/m68k-amiga/boot/romlog.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Idx Name Size VMA LMA File off Algn
2-
0 .rom 00078d40 00f80000 00f80000 0007c000 2**2
3-
1 .ext 00078446 00e00000 00e00000 00002000 2**2
2+
0 .rom 00078d44 00f80000 00f80000 0007c000 2**2
3+
1 .ext 00078452 00e00000 00e00000 00002000 2**2

arch/m68k-amiga/hidd/gayle_ata/probe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ static UBYTE *getport(struct ata_ProbedBus *ddata, int buscounter)
128128
return NULL;
129129
}
130130

131+
RETRY:
132+
131133
ddata->port = (UBYTE*)port;
132134
altport = port + 0x1010;
133135
ddata->altport = (UBYTE*)altport;
@@ -142,8 +144,6 @@ static UBYTE *getport(struct ata_ProbedBus *ddata, int buscounter)
142144

143145
DINIT(bug("[ATA:Probe] Status=%02x,%02x\n", status1, status2);)
144146

145-
RETRY:
146-
147147
if ((((status1 | status2) & (ATAF_BUSY | ATAF_DRDY)) == (ATAF_BUSY | ATAF_DRDY)) || ((status1 | status2) & (ATAF_ERROR | ATAF_DATAREQ)))
148148
{
149149
if(retrynum++ < 10) goto RETRY;

rom/devs/ata/ata.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
#endif
5656

5757
#if DEBUG
58+
59+
#define DATAINIT(x) x
60+
#define DCONTROL(x) x
61+
#define DINITBUS(x) x
62+
#define DSIGNATURE(x) x
5863
#define DINIT(x) x
5964
#define D(x) x
6065
#define DD(x)
@@ -64,6 +69,10 @@
6469
#define DATTR(x)
6570
#define DATAPI(x)
6671
#else
72+
#define DATAINIT(x)
73+
#define DCONTROL(x)
74+
#define DINITBUS(x)
75+
#define DSIGNATURE(x)
6776
#define DINIT(x)
6877
#define D(x)
6978
#define DD(x)

rom/devs/ata/ata_controllerclass.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ OOP_Object *ATA__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg)
3131
struct ata_Controller *data = OOP_INST_DATA(cl, ataController);
3232

3333
/*register the controller in ata.device */
34-
D(bug ("[ATA:Controller] %s: Controller Entry @ 0x%p\n", __func__, data);)
34+
DCONTROL(bug ("[ATA:Controller] %s: Controller Entry @ 0x%p\n", __func__, data);)
3535

3636
data->ac_Class = cl;
3737
data->ac_Object = ataController;
@@ -51,12 +51,12 @@ OOP_Object *ATA__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg)
5151
TASKTAG_ARG2 , data,
5252
TAG_DONE))
5353
{
54-
D(bug("[ATA:Controller] %s: Failed to start up daemon!\n", __func__));
54+
DCONTROL(bug("[ATA:Controller] %s: Failed to start up daemon!\n", __func__));
5555
return FALSE;
5656
}
5757

5858
Wait(SIGF_SINGLE);
59-
D(bug("[ATA:Controller] %s: Daemon task set to 0x%p\n", __func__, data->ac_Daemon));
59+
DCONTROL(bug("[ATA:Controller] %s: Daemon task set to 0x%p\n", __func__, data->ac_Daemon));
6060

6161
AddTail(&ATABase->ata_Controllers, &data->ac_Node);
6262
}
@@ -68,20 +68,20 @@ VOID ATA__Root__Dispose(OOP_Class *cl, OOP_Object *o, OOP_Msg msg)
6868
struct ataBase *ATABase = cl->UserData;
6969
struct ata_Controller *ataNode, *tmpNode;
7070

71-
D(bug ("[ATA:Controller] %s(0x%p)\n", o);)
71+
DCONTROL(bug ("[ATA:Controller] %s(0x%p)\n", o);)
7272

7373
ForeachNodeSafe (&ATABase->ata_Controllers, ataNode, tmpNode)
7474
{
7575
if (ataNode->ac_Object == o)
7676
{
77-
D(bug("[ATA:Controller] %s: Stopping Daemon...\n", __func__));
77+
DCONTROL(bug("[ATA:Controller] %s: Stopping Daemon...\n", __func__));
7878
ataNode->ac_daemonParent = FindTask(NULL);
7979
SetSignal(0, SIGF_SINGLE);
8080
Signal(ataNode->ac_Daemon, SIGBREAKF_CTRL_C);
8181
Wait(SIGF_SINGLE);
82-
D(bug("[ATA:Controller] %s: Daemon stopped\n", __func__));
82+
DCONTROL(bug("[ATA:Controller] %s: Daemon stopped\n", __func__));
8383

84-
D(bug ("[ATA:Controller] %s: Destroying Controller Entry @ 0x%p\n", __func__, ataNode);)
84+
DCONTROL(bug ("[ATA:Controller] %s: Destroying Controller Entry @ 0x%p\n", __func__, ataNode);)
8585
Remove(&ataNode->ac_Node);
8686

8787
OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
@@ -111,7 +111,7 @@ void ATA__Root__Get(OOP_Class *cl, OOP_Object *o, struct pRoot_Get *msg)
111111

112112
BOOL ATA__Hidd_StorageController__RemoveBus(OOP_Class *cl, OOP_Object *o, struct pHidd_StorageController_RemoveBus *msg)
113113
{
114-
D(bug ("[ATA:Controller] Hidd_StorageController__RemoveBus(0x%p)\n", msg->busObject);)
114+
DCONTROL(bug ("[ATA:Controller] Hidd_StorageController__RemoveBus(0x%p)\n", msg->busObject);)
115115
/*
116116
* Currently we don't support unloading ATA bus drivers.
117117
* This is a very-very big TODO.
@@ -124,7 +124,7 @@ BOOL ATA__Hidd_StorageController__SetUpBus(OOP_Class *cl, OOP_Object *o, struct
124124
struct ataBase *ATABase = cl->UserData;
125125
struct TagItem busTags[2];
126126

127-
D(bug ("[ATA:Controller] Hidd_StorageController__SetUpBus(0x%p)\n", msg->busObject));
127+
DCONTROL(bug ("[ATA:Controller] Hidd_StorageController__SetUpBus(0x%p)\n", msg->busObject));
128128

129129
/*
130130
* Instantiate interfaces. PIO is mandatory, DMA is not.
@@ -135,7 +135,7 @@ BOOL ATA__Hidd_StorageController__SetUpBus(OOP_Class *cl, OOP_Object *o, struct
135135
*/
136136
if (!HIDD_ATABus_GetPIOInterface(msg->busObject)) return FALSE;
137137

138-
D(bug ("[ATA:Controller] Hidd_StorageController__SetUpBus: PIO Interfaces obtained\n"));
138+
DCONTROL(bug ("[ATA:Controller] Hidd_StorageController__SetUpBus: PIO Interfaces obtained\n"));
139139

140140
if (!ATABase->ata_NoDMA) HIDD_ATABus_GetDMAInterface(msg->busObject);
141141

@@ -144,14 +144,14 @@ BOOL ATA__Hidd_StorageController__SetUpBus(OOP_Class *cl, OOP_Object *o, struct
144144
busTags[1].ti_Tag = TAG_DONE;
145145
OOP_SetAttrs(msg->busObject, busTags);
146146

147-
D(bug ("[ATA:Controller] Hidd_StorageController__SetUpBus: Starting Bus...\n"));
147+
DCONTROL(bug ("[ATA:Controller] Hidd_StorageController__SetUpBus: Starting Bus...\n"));
148148

149149
/* Add the bus to the device and start service */
150150
return Hidd_ATABus_Start(msg->busObject, ATABase);
151151
}
152152

153153
void ATA__Hidd_StorageController__CleanUpBus(OOP_Class *cl, OOP_Object *o, struct pHidd_StorageController_CleanUpBus *msg)
154154
{
155-
D(bug ("[ATA:Controller] Hidd_StorageController__CleanUpBus(0x%p)\n", msg->busObject);)
155+
DCONTROL(bug ("[ATA:Controller] Hidd_StorageController__CleanUpBus(0x%p)\n", msg->busObject);)
156156
/* By default we have nothing to do here */
157157
}

rom/devs/ata/ata_init.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ BOOL ata_RegisterVolume(ULONG StartCyl, ULONG EndCyl, struct ata_Unit *unit)
6565
dosdevname[1] = 'D';
6666
break;
6767
default:
68-
D(bug("[ATA>>]:-ata_RegisterVolume called on unknown devicetype\n"));
68+
DATAINIT(bug("[ATA>>]:-ata_RegisterVolume called on unknown devicetype\n"));
6969
}
7070

7171
if (unit->au_UnitNum < 10) dosdevname[5] += unit->au_UnitNum % 10;
@@ -96,15 +96,15 @@ BOOL ata_RegisterVolume(ULONG StartCyl, ULONG EndCyl, struct ata_Unit *unit)
9696

9797
if (devnode)
9898
{
99-
D(bug("[ATA>>]:-ata_RegisterVolume=%b, DosType=0x%08lx | LowCyl=%d | HighCyl=%d | Heads=%d | Blocksize=%d | BlockPerTrack=%d .. ",
99+
DATAINIT(bug("[ATA>>]:-ata_RegisterVolume=%b, DosType=0x%08lx | LowCyl=%d | HighCyl=%d | Heads=%d | Blocksize=%d | BlockPerTrack=%d .. ",
100100
devnode->dn_Name, pp[DE_DOSTYPE + 4], StartCyl, EndCyl, unit->au_Heads, 1 << unit->au_SectorShift, unit->au_Sectors));
101101

102102
if (unit->au_DevType == DG_DIRECT_ACCESS) // && ((unit->au_Flags & AF_Removable) == 0))
103103
{
104104
AddBootNode(pp[DE_BOOTPRI + 4], ADNF_STARTPROC, devnode, NULL);
105-
D(bug("BootNode (Direct Access Medium)\n"));
105+
DATAINIT(bug("BootNode (Direct Access Medium)\n"));
106106
} else {
107-
D(bug("DosNode (CD/DVD or other Non-Direct Access Medium)\n"));
107+
DATAINIT(bug("DosNode (CD/DVD or other Non-Direct Access Medium)\n"));
108108
}
109109

110110
return TRUE;
@@ -141,7 +141,7 @@ static int ATA_init(struct ataBase *ATABase)
141141
{
142142
struct BootLoaderBase *BootLoaderBase;
143143

144-
D(bug("[ATA--] %s: ata.device Initialization\n", __func__));
144+
DATAINIT(bug("[ATA--] %s: ata.device Initialization\n", __func__));
145145

146146
/* Prepare the list of detected controllers */
147147
NEWLIST(&ATABase->ata_Controllers);
@@ -157,7 +157,7 @@ static int ATA_init(struct ataBase *ATABase)
157157
* obtain kernel parameters
158158
*/
159159
BootLoaderBase = OpenResource("bootloader.resource");
160-
D(bug("[ATA--] %s: BootloaderBase = %p\n", __func__, BootLoaderBase));
160+
DATAINIT(bug("[ATA--] %s: BootloaderBase = %p\n", __func__, BootLoaderBase));
161161
if (BootLoaderBase != NULL)
162162
{
163163
struct List *list;
@@ -174,27 +174,27 @@ static int ATA_init(struct ataBase *ATABase)
174174

175175
if (strstr(CmdLine, "disable"))
176176
{
177-
D(bug("[ATA ] %s: Disabling ATA support\n", __func__));
177+
DATAINIT(bug("[ATA ] %s: Disabling ATA support\n", __func__));
178178
return FALSE;
179179
}
180180
if (strstr(CmdLine, "32bit"))
181181
{
182-
D(bug("[ATA ] %s: Using 32-bit IO transfers\n", __func__));
182+
DATAINIT(bug("[ATA ] %s: Using 32-bit IO transfers\n", __func__));
183183
ATABase->ata_32bit = TRUE;
184184
}
185185
if (strstr(CmdLine, "nomulti"))
186186
{
187-
D(bug("[ATA ] %s: Disabled multisector transfers\n", __func__));
187+
DATAINIT(bug("[ATA ] %s: Disabled multisector transfers\n", __func__));
188188
ATABase->ata_NoMulti = TRUE;
189189
}
190190
if (strstr(CmdLine, "nodma"))
191191
{
192-
D(bug("[ATA ] %s: Disabled DMA transfers\n", __func__));
192+
DATAINIT(bug("[ATA ] %s: Disabled DMA transfers\n", __func__));
193193
ATABase->ata_NoDMA = TRUE;
194194
}
195195
if (strstr(CmdLine, "poll"))
196196
{
197-
D(bug("[ATA ] %s: Using polling to detect end of busy state\n", __func__));
197+
DATAINIT(bug("[ATA ] %s: Using polling to detect end of busy state\n", __func__));
198198
ATABase->ata_Poll = TRUE;
199199
}
200200
}
@@ -219,7 +219,7 @@ static int ATA_init(struct ataBase *ATABase)
219219
return FALSE;
220220
}
221221

222-
D(bug("[ATA--] %s: MemPool @ %p\n", __func__, ATABase->ata_MemPool));
222+
DATAINIT(bug("[ATA--] %s: MemPool @ %p\n", __func__, ATABase->ata_MemPool));
223223

224224
/*
225225
* ata drive cache memory allocation
@@ -231,7 +231,7 @@ static int ATA_init(struct ataBase *ATABase)
231231
return FALSE;
232232
}
233233

234-
D(bug("[ATA--] %s: CacheData @ %p\n", __func__, ATABase->ata_CacheData));
234+
DATAINIT(bug("[ATA--] %s: CacheData @ %p\n", __func__, ATABase->ata_CacheData));
235235

236236
ATABase->ata_CacheTags = AllocMem(CACHE_SIZE*8, MEMF_CLEAR | MEMF_PUBLIC);
237237
if (ATABase->ata_CacheTags == NULL)
@@ -244,15 +244,15 @@ static int ATA_init(struct ataBase *ATABase)
244244
ATABase->ata_CacheTags[i] = 0xfffffffffffffffful;
245245
}
246246

247-
D(bug("[ATA--] %s: CacheTags @ %p\n", __func__, ATABase->ata_CacheTags));
247+
DATAINIT(bug("[ATA--] %s: CacheTags @ %p\n", __func__, ATABase->ata_CacheTags));
248248

249249
#if defined(__OOP_NOATTRBASES__)
250250
if (OOP_ObtainAttrBasesArray(&ATABase->unitAttrBase, attrBaseIDs))
251251
{
252252
bug("[ATA--] %s: Failed to obtain AttrBases!\n", __func__);
253253
return FALSE;
254254
}
255-
D(
255+
DATAINIT(
256256
bug("[ATA--] %s: HiddBusAB %x @ 0x%p\n", __func__, HiddBusAB, &HiddBusAB);
257257
bug("[ATA--] %s: HiddATABusAB %x @ 0x%p\n", __func__, HiddATABusAB, &HiddATABusAB);
258258
)
@@ -274,7 +274,7 @@ static int ATA_init(struct ataBase *ATABase)
274274

275275
InitSemaphore(&ATABase->DetectionSem);
276276

277-
D(bug("[ATA ] %s: Base ATA Hidd Class @ 0x%p\n", __func__, ATABase->ataClass));
277+
DATAINIT(bug("[ATA ] %s: Base ATA Hidd Class @ 0x%p\n", __func__, ATABase->ataClass));
278278

279279
return TRUE;
280280
}
@@ -300,27 +300,27 @@ static int ata_expunge(struct ataBase *ATABase)
300300
/* Destroy our singletone */
301301
OOP_MethodID disp_msg = OOP_GetMethodID(IID_Root, moRoot_Dispose);
302302

303-
D(bug("[ATA ] ata_expunge: destroying subystem object\n"));
303+
DATAINIT(bug("[ATA ] ata_expunge: destroying subystem object\n"));
304304
OOP_DoSuperMethod(ataNode->ac_Class, ataNode->ac_Object, &disp_msg);
305305
FreeMem(ataNode, sizeof(struct ata_Controller));
306306
}
307307
else
308308
{
309309
/* Our subsystem is in use, we have some bus driver(s) around. */
310-
D(bug("[ATA ] ata_expunge: ATA subsystem is in use\n"));
310+
DATAINIT(bug("[ATA ] ata_expunge: ATA subsystem is in use\n"));
311311
return FALSE;
312312
}
313313
}
314314

315315
#if defined(__OOP_NOATTRBASES__)
316-
D(bug("[ATA ] ata_expunge: Releasing attribute bases\n"));
316+
DATAINIT(bug("[ATA ] ata_expunge: Releasing attribute bases\n"));
317317
OOP_ReleaseAttrBasesArray(&ATABase->unitAttrBase, attrBaseIDs);
318318
#endif
319319

320320
if (ATABase->ata_UtilityBase)
321321
CloseLibrary(ATABase->ata_UtilityBase);
322322

323-
D(bug("[ATA ] ata_expunge: Exiting\n"));
323+
DATAINIT(bug("[ATA ] ata_expunge: Exiting\n"));
324324
return TRUE;
325325
}
326326

@@ -343,7 +343,7 @@ static int open(struct ataBase *ATABase, struct IORequest *iorq, ULONG unitnum,
343343
{
344344
HIDD_StorageController_EnumBuses(ataNode->ac_Object, &searchHook, (APTR)(IPTR)unitnum);
345345
}
346-
D(bug("[ATA%02d] Open result: %d\n", unitnum, iorq->io_Error));
346+
DATAINIT(bug("[ATA%02d] Open result: %d\n", unitnum, iorq->io_Error));
347347

348348
/* If found, io_Error will be reset to zero */
349349
return iorq->io_Error ? FALSE : TRUE;

0 commit comments

Comments
 (0)