From 6736f878aafee238a7c17250a345a3bccb504a67 Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Tue, 12 May 2026 15:33:29 +0200 Subject: [PATCH] Amiga: graphical tombstone RTG-screen fallback amii_outrip relies on LoadRGB4/transpalette fade and raw BltBitMap to a SMART_REFRESH window -- chipset-era idioms that do not reach the visible display on Picasso96 or CyberGraphX screens. On RTG the screen stayed black and the user saw nothing between the death messages and the high-score list. Detect RTG by screen size > 800x600 and fall through to genl_outrip so RTG users get the ASCII tombstone instead. Switch the still-graphical path to BltBitMapRastPort so the blit goes through the layer system, and move CloseWindow(ripwin) outside the Forbid()/Permit() pair (same fix as amii_cleanup). Rename cmap_white/cmap_black to cmap_outline/cmap_fill -- those variables actually hold the indices of the darkest and lightest palette entries, used for the four offset outline strokes and the centered fill stroke respectively; the old names were backwards. --- sys/amiga/amirip.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/sys/amiga/amirip.c b/sys/amiga/amirip.c index 6c23a4f6c..5ccb9aac1 100644 --- a/sys/amiga/amirip.c +++ b/sys/amiga/amirip.c @@ -81,7 +81,7 @@ static struct NewWindow newwin = { 0, 0, 640, 200, 1, 0, int wh; /* was local in outrip, but needed for SCALE macro */ -int cmap_white, cmap_black; +int cmap_outline, cmap_fill; void amii_outrip(winid tmpwin, int how, time_t when) @@ -99,6 +99,16 @@ amii_outrip(winid tmpwin, int how, time_t when) if (!WINVERS_AMIV || HackScreen->RastPort.BitMap->Depth < 4) goto cleanup; + /* The graphical tombstone uses raw chipset-style palette twiddling + * (LoadRGB4, transpalette fade) and BltBitMap to a SMART_REFRESH + * window. That works on the native chipset and AGA, but on RTG + * setups (Picasso96, CyberGraphX) the visible display is decoupled + * from the chipset registers and the tombstone never appears. + * Detect RTG by screen size beyond what chipset modes can reach + * and fall through to the plain ASCII tombstone instead. */ + if (HackScreen->Width > 800 || HackScreen->Height > 600) + goto cleanup; + /* Use the users display size */ newwin.Height = amiIDisplay->ypix - newwin.TopEdge; newwin.Width = amiIDisplay->xpix; @@ -132,11 +142,11 @@ amii_outrip(winid tmpwin, int how, time_t when) for (i = 0; i < SIZE(cols); i++) cols[i] = cols_base[i] + xoff; - cmap_white = search_cmap(0, 0, 0); - cmap_black = search_cmap(15, 15, 15); + cmap_outline = search_cmap(0, 0, 0); + cmap_fill = search_cmap(15, 15, 15); - BltBitMap(tombimg, 0, 0, rp->BitMap, xoff, yoff, tomb_bmhd.w, tomb_bmhd.h, - 0xc0, 0xff, NULL); + BltBitMapRastPort(tombimg, 0, 0, rp, xoff, yoff, + tomb_bmhd.w, tomb_bmhd.h, 0xc0); /* Put together death description */ formatkiller(buf, sizeof buf, how, FALSE); @@ -254,8 +264,8 @@ cleanup: Forbid(); while (imsg = (struct IntuiMessage *) GetMsg(ripwin->UserPort)) ReplyMsg((struct Message *) imsg); - CloseWindow(ripwin); Permit(); + CloseWindow(ripwin); } LoadRGB4(&HackScreen->ViewPort, sysflags.amii_curmap, amii_numcolors); @@ -279,23 +289,23 @@ tomb_text(char *p) sprintf(buf, " %s ", p); l = TextLength(rp, buf, strlen(buf)); - SetAPen(rp, cmap_white); + SetAPen(rp, cmap_outline); Move(rp, cols[cno] - (l / 2) - 1, tomb_line); Text(rp, buf, strlen(buf)); - SetAPen(rp, cmap_white); + SetAPen(rp, cmap_outline); Move(rp, cols[cno] - (l / 2) + 1, tomb_line); Text(rp, buf, strlen(buf)); - SetAPen(rp, cmap_white); + SetAPen(rp, cmap_outline); Move(rp, cols[cno] - (l / 2), tomb_line - 1); Text(rp, buf, strlen(buf)); - SetAPen(rp, cmap_white); + SetAPen(rp, cmap_outline); Move(rp, cols[cno] - (l / 2), tomb_line + 1); Text(rp, buf, strlen(buf)); - SetAPen(rp, cmap_black); + SetAPen(rp, cmap_fill); Move(rp, cols[cno] - (l / 2), tomb_line); Text(rp, buf, strlen(buf)); }