Skip to content

Commit 13d4c99

Browse files
committed
Suppress AROSTCP debug messages / Skip SAGA Sprite Mousepoiunter when not on Apollo
1 parent 9a954f7 commit 13d4c99

3 files changed

Lines changed: 76 additions & 73 deletions

File tree

arch/m68k-amiga/hidd/sagagfx/sagagfx_hw_v4.c

Lines changed: 57 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -134,73 +134,79 @@ VOID SAGAHW_V4_SetSpriteHide(VOID)
134134

135135
VOID SAGAHW_V4_SetSpriteColors(UWORD *colors)
136136
{
137-
ULONG colorvalue;
137+
if((ULONG)((*(volatile UWORD *)0xdff3fc) >> 8))
138+
{
139+
ULONG colorvalue;
138140

139-
for (int i = 0; i < 4; i++)
140-
{
141-
colorvalue = (colors[i] & (0x0F00)) << 12 | (colors[i] & (0x00F0)) << 8 | (colors[i] & (0x000F)) << 4; // CLUT4->CLUT8
142-
143-
//kprintf("Sprite Color %d: %04x -> %08x\n", i, colors[i], colorvalue);
141+
for (int i = 0; i < 4; i++)
142+
{
143+
colorvalue = (colors[i] & (0x0F00)) << 12 | (colors[i] & (0x00F0)) << 8 | (colors[i] & (0x000F)) << 4; // CLUT4->CLUT8
144+
145+
//kprintf("Sprite Color %d: %04x -> %08x\n", i, colors[i], colorvalue);
144146

145-
WRITE16(SAGA_VIDEO_SPRITECLUT_IDX, i);
146-
WRITE32(SAGA_VIDEO_SPRITECLUT_RGB, colorvalue);
147+
WRITE16(SAGA_VIDEO_SPRITECLUT_IDX, i);
148+
WRITE32(SAGA_VIDEO_SPRITECLUT_RGB, colorvalue);
149+
}
147150
}
148151
}
149152

150153
VOID SAGAHW_V4_SetSpriteMemory(UBYTE *memory)
151154
{
152-
IPTR ptr = SAGA_VIDEO_SPRITEDATA;
153-
154-
ULONG x, y, value;
155-
156-
for (y=0; y < 16; y++)
155+
if((ULONG)((*(volatile UWORD *)0xdff3fc) >> 8))
157156
{
158-
for (x=0; x < 8; x++)
157+
IPTR ptr = SAGA_VIDEO_SPRITEDATA;
158+
159+
ULONG x, y, value;
160+
161+
for (y=0; y < 16; y++)
159162
{
160-
value = (memory[y * 16 + (x*2)] << 24) | (0xAA)<< 16 | (memory[y * 16 + (x*2) + 1] << 8) | (0xAA);
161-
WRITE32(ptr, value);
162-
ptr+=4;
163+
for (x=0; x < 8; x++)
164+
{
165+
value = (memory[y * 16 + (x*2)] << 24) | (0xAA)<< 16 | (memory[y * 16 + (x*2) + 1] << 8) | (0xAA);
166+
WRITE32(ptr, value);
167+
ptr+=4;
168+
}
169+
for (x=0; x < 8; x++)
170+
{
171+
WRITE32(ptr, 0x00000000);
172+
ptr+=4;
173+
}
163174
}
164-
for (x=0; x < 8; x++)
175+
176+
for (x=0; x < 256; x++)
165177
{
166178
WRITE32(ptr, 0x00000000);
167-
ptr+=4;
168-
}
169-
}
170-
171-
for (x=0; x < 256; x++)
172-
{
173-
WRITE32(ptr, 0x00000000);
174-
ptr += 4;
175-
}
179+
ptr += 4;
180+
}
176181

177-
/*for (y = 0; y < 16; y++)
178-
{
179-
pix = 0x80008000;
180-
val = 0;
181-
182-
for (x = 0; x < 16; x++)
182+
/*for (y = 0; y < 16; y++)
183183
{
184-
switch (memory[y * 16 + x])
184+
pix = 0x80008000;
185+
val = 0;
186+
187+
for (x = 0; x < 16; x++)
185188
{
186-
case 1:
187-
val |= pix & 0xffff0000;
188-
break;
189-
case 2:
190-
val |= pix & 0x0000ffff;
191-
break;
192-
case 3:
193-
val |= pix;
194-
break;
195-
default:
196-
break;
189+
switch (memory[y * 16 + x])
190+
{
191+
case 1:
192+
val |= pix & 0xffff0000;
193+
break;
194+
case 2:
195+
val |= pix & 0x0000ffff;
196+
break;
197+
case 3:
198+
val |= pix;
199+
break;
200+
default:
201+
break;
202+
}
203+
pix >>= 1;
197204
}
198-
pix >>= 1;
199-
}
200-
201-
WRITE32(ptr, val);
202-
ptr += 4;
203-
}*/
205+
206+
WRITE32(ptr, val);
207+
ptr += 4;
208+
}*/
209+
}
204210
}
205211

206212
VOID SAGAHW_V4_SetSpritePosition(WORD x, WORD y)

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Release 9.6-RC03
1+
Release 9.6

workbench/network/stacks/AROSTCP/bsdsocket/net/if_sana.c

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ sana_deinit(void)
153153
CloseDevice((struct IORequest*)req);
154154
DeleteIOSana2Req(req);
155155
} else {
156-
__log(LOG_ERR, "sana_deinit(): Couldn't close device %s\n",
157-
ssc->ss_name);
156+
DSANA(__log(LOG_ERR, "sana_deinit(): Couldn't close device %s\n", ssc->ss_name);)
158157
}
159158
}
160159

@@ -183,8 +182,7 @@ sana_poll(void)
183182
if (io->ioip_dispatch) {
184183
(*io->ioip_dispatch)(io->ioip_if, io);
185184
} else {
186-
__log(LOG_ERR, "No dispatch function in request for %s\n",
187-
io->ioip_if->ss_name);
185+
DSANA(__log(LOG_ERR, "No dispatch function in request for %s\n", io->ioip_if->ss_name);)
188186
}
189187
}
190188

@@ -304,7 +302,7 @@ iface_make(struct ssconfig *ifc)
304302
/* Allocate the request for opening the device */
305303
if ((req = CreateIOSana2Req(NULL)) == NULL)
306304
{
307-
__log(LOG_ERR, "iface_find(): CreateIOSana2Req failed\n");
305+
DSANA(__log(LOG_ERR, "iface_find(): CreateIOSana2Req failed\n"));
308306
}
309307
else
310308
{
@@ -323,7 +321,7 @@ iface_make(struct ssconfig *ifc)
323321

324322
if (!ssc)
325323
{
326-
__log(LOG_ERR, "iface_find: out of memory\n");
324+
DSANA((LOG_ERR, "iface_find: out of memory\n");)
327325
}
328326
else
329327
{
@@ -391,7 +389,7 @@ D(bug("[AROSTCP] if_sana.c: iface_make: IP set to 0.0.0.0\n"));
391389

392390
if (!ssc)
393391
{
394-
__log(LOG_ERR, "iface_find: out of memory\n");
392+
DSANA(__log(LOG_ERR, "iface_find: out of memory\n"));
395393
}
396394
else
397395
{
@@ -704,7 +702,7 @@ sana_send_read(struct sana_softc *ssc, WORD count, ULONG type, ULONG mtu,
704702
no_resources:
705703
if (req)
706704
AddHead((struct List*)&ssc->ss_freereq, (struct Node*)req);
707-
__log(LOG_ERR, "sana_send_read: could not queue enough read requests\n");
705+
DSANA(__log(LOG_ERR, "sana_send_read: could not queue enough read requests\n"));
708706
return i;
709707
}
710708

@@ -779,7 +777,7 @@ D(bug("[ATCP-SANA] sana_up('%s%d')\n", ssc->ss_if.if_name, ssc->ss_if.if_unit));
779777
sana2perror("S2_ONLINE", req);
780778
gui_set_interface_state(&ssc->ss_if, MIAMIPANELV_AddInterface_State_Offline);
781779
} else {
782-
__log(LOG_NOTICE, "%s%d is now online.", ssc->ss_name, ssc->ss_if.if_unit);
780+
//__log(LOG_NOTICE, "%s%d is now online.", ssc->ss_name, ssc->ss_if.if_unit);
783781
sana_restore(ssc);
784782
}
785783
DeleteIOSana2Req(req);
@@ -842,7 +840,7 @@ sana_down(struct sana_softc *ssc)
842840
} else
843841
success = TRUE;
844842
if (success) {
845-
__log(LOG_NOTICE, "%s%d is now offline.", ssc->ss_name, ssc->ss_if.if_unit);
843+
DSANA(__log(LOG_NOTICE, "%s%d is now offline.", ssc->ss_name, ssc->ss_if.if_unit);)
846844
gui_set_interface_state(&ssc->ss_if, MIAMIPANELV_AddInterface_State_Offline);
847845
} else
848846
gui_set_interface_state(&ssc->ss_if, MIAMIPANELV_AddInterface_State_Online);
@@ -917,7 +915,7 @@ sana_read(struct sana_softc *ssc, struct IOIPReq *req,
917915
splx(s);
918916
return m;
919917
}
920-
__log(LOG_ERR, "sana_read (%s): not enough mbufs\n", ssc->ss_name);
918+
DSANA(__log(LOG_ERR, "sana_read (%s): not enough mbufs\n", ssc->ss_name);)
921919
}
922920

923921
/* do not resend, free used resources */
@@ -997,7 +995,7 @@ sana_online(struct sana_softc *ssc, struct IOIPReq *req)
997995
ssc->ss_eventsent--;
998996
req->ioip_dispatch = NULL;
999997
AddHead((struct List*)&ssc->ss_freereq, (struct Node*)req);
1000-
__log(LOG_NOTICE, "%s is online again.", ssc->ss_name);
998+
DSANA(__log(LOG_NOTICE, "%s is online again.", ssc->ss_name);)
1001999
sana_restore(ssc);
10021000
return;
10031001
}
@@ -1155,8 +1153,7 @@ sana_output(struct ifnet *ifp, struct mbuf *m0,
11551153
#endif
11561154

11571155
default:
1158-
__log(LOG_ERR, "%s%ld: can't handle af%ld\n",
1159-
ssc->ss_if.if_name, ssc->ss_if.if_unit, dst->sa_family);
1156+
DSANA(__log(LOG_ERR, "%s%ld: can't handle af%ld\n", ssc->ss_if.if_name, ssc->ss_if.if_unit, dst->sa_family));
11601157
error = EAFNOSUPPORT;
11611158
goto bad;
11621159
}
@@ -1234,40 +1231,40 @@ static int sana_query(struct ifnet *ifn, struct TagItem *tag)
12341231
*((ULONG *)tag->ti_Data) = ssc->ss_hwtype;
12351232
break;
12361233
case IFQ_NumReadRequests:
1237-
__log(LOG_CRIT, "IFQ_NumReadRequests is not implemented");
1234+
DSANA(__log(LOG_CRIT, "IFQ_NumReadRequests is not implemented"));
12381235
return -1;
12391236
/* *((LONG *)tag->ti_Data) = *** TODO ***
12401237
break;*/
12411238
case IFQ_MaxReadRequests:
1242-
__log(LOG_CRIT, "IFQ_MaxReadRequests is not implemented");
1239+
DSANA(__log(LOG_CRIT, "IFQ_MaxReadRequests is not implemented"));
12431240
return -1;
12441241
/* *((LONG *)tag->ti_Data) =
12451242
break;*/
12461243
case IFQ_NumWriteRequests:
1247-
__log(LOG_CRIT, "IFQ_NumWriteRequests is not implemented");
1244+
DSANA(__log(LOG_CRIT, "IFQ_NumWriteRequests is not implemented"));
12481245
return -1;
12491246
/* *((LONG *)tag->ti_Data) =
12501247
break;*/
12511248
case IFQ_MaxWriteRequests:
1252-
__log(LOG_CRIT, "IFQ_MaxWriteRequests is not implemented");
1249+
DSANA(__log(LOG_CRIT, "IFQ_MaxWriteRequests is not implemented"));
12531250
return -1;
12541251
/* *((LONG *)tag->ti_Data) =
12551252
break;*/
12561253
case IFQ_GetDebugMode:
12571254
*((LONG *)tag->ti_Data) = debug_sana;
12581255
break;
12591256
case IFQ_GetSANA2CopyStats:
1260-
__log(LOG_CRIT, "IFQ_GetSANA2CopyStats is not implemented");
1257+
DSANA(__log(LOG_CRIT, "IFQ_GetSANA2CopyStats is not implemented"));
12611258
return -1;
12621259
/* (struct Sana2CopyStats *)tag->ti_Data
12631260
break;*/
12641261
case IFQ_NumReadRequestsPending:
1265-
__log(LOG_CRIT, "IFQ_NumReadRequestsPending is not implemented");
1262+
DSANA(__log(LOG_CRIT, "IFQ_NumReadRequestsPending is not implemented"));
12661263
return -1;
12671264
/* *((LONG *)tag->ti_Data =
12681265
break;*/
12691266
case IFQ_NumWriteRequestsPending:
1270-
__log(LOG_CRIT, "IFQ_NumWriteRequestsPending is not implemented");
1267+
DSANA(__log(LOG_CRIT, "IFQ_NumWriteRequestsPending is not implemented"));
12711268
return -1;
12721269
/* *((LONG *)tag->ti_Data =
12731270
break;*/

0 commit comments

Comments
 (0)