--- uae/src/picasso96.c 2018/04/24 16:42:09 1.1.1.2 +++ uae/src/picasso96.c 2018/04/24 16:43:29 1.1.1.3 @@ -26,6 +26,8 @@ * * TODO: * - add panning capability + * - we want to add a manual switch to override SetSwitch for hardware banging + * programs started from a Picasso workbench. */ #include "sysconfig.h" @@ -313,9 +315,9 @@ static void CopyLibResolutionStructureU2 char *uaememptr = 0; int i; - uaememptr = gfxmem_xlate(amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */ - memset(uaememptr, 0, PSSO_LibResolution_sizeof); /* zero out our LibResolution structure */ - strcpy(uaememptr + PSSO_LibResolution_P96ID, libres->P96ID); + uaememptr = gfxmem_xlate (amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */ + memset (uaememptr, 0, PSSO_LibResolution_sizeof); /* zero out our LibResolution structure */ + strcpy (uaememptr + PSSO_LibResolution_P96ID, libres->P96ID); put_long (amigamemptr + PSSO_LibResolution_DisplayID, libres->DisplayID); put_word (amigamemptr + PSSO_LibResolution_Width, libres->Width); put_word (amigamemptr + PSSO_LibResolution_Height, libres->Height); @@ -560,9 +562,9 @@ static int renderinfo_is_current_screen { if (! picasso_on) return 0; - if (ri->Memory != gfxmemory + (picasso96_state.Address - gfxmem_start)) { + if (ri->Memory != gfxmemory + (picasso96_state.Address - gfxmem_start)) return 0; - } + return 1; } @@ -719,7 +721,7 @@ uae_u32 picasso_InitCard (void) res.P96ID[4] = '0'; res.P96ID[5] = ':'; strcpy (res.Name, "uaegfx:"); - strncat (res.Name, DisplayModes[i].name, strchr(DisplayModes[i].name, ',') - DisplayModes[i].name); + strncat (res.Name, DisplayModes[i].name, strchr (DisplayModes[i].name, ',') - DisplayModes[i].name); res.Modes[PLANAR] = 0; res.Modes[CHUNKY] = 0; res.Modes[HICOLOR] = 0; @@ -1382,7 +1384,7 @@ uae_u32 picasso_BlitPattern (void) uae_u8 Mask = (uae_u8)m68k_dreg (regs, 4); uae_u32 RGBFmt = m68k_dreg (regs, 7); - uae_u8 Bpp = GetBytesPerPixel(RGBFmt); + uae_u8 Bpp = GetBytesPerPixel (RGBFmt); int inversion = 0; struct RenderInfo ri; struct Pattern pattern;