English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 23 August 2016, 09:18   #1
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,290
DblPAL vs changing the screen bitmap using Copper

To implement the EGA split screen mode in Catacomb 3D, I'm using a custom copper list that changes the bitplane pointers at the correct line. This work well with the good old PAL monitor, but for some reason the 4th bitplane is missing with DblPAL. This is how the custom copper list looks like:
Code:
#define BPLPTH(p) (*((UWORD *)&custom.bplpt[0] + (2 * (p))))
#define BPLPTL(p) (*((UWORD *)&custom.bplpt[0] + (2 * (p)) + 1))
#define HIWORD(x) ((ULONG)(x)>>16 & 0xffff)
#define LOWORD(x) ((ULONG)(x) & 0xffff)

static void BEL_ST_AddSplitlineCopList(uint16_t splitline)
{
    struct TagItem uCopTags[] =
    {
        {VTAG_USERCLIP_SET, NULL},
        {VTAG_END_CM, NULL}
    };
    int i;

    if ((ucl = AllocMem(sizeof(struct UCopList), MEMF_PUBLIC|MEMF_CLEAR)))
    {
        CINIT(ucl, 16);
        CWAIT(ucl, splitline, 0);
        for (i = 0; i < 4; i++)
        {
            CMOVE(ucl, BPLPTH(i), HIWORD(&g_sdlVidMem->egaGfx[i][0]));
            CMOVE(ucl, BPLPTL(i), LOWORD(&g_sdlVidMem->egaGfx[i][0]));
        }
        CEND(ucl);

        Forbid();
        g_amigaScreen->ViewPort.UCopIns = ucl;
        Permit();

        VideoControl(g_amigaScreen->ViewPort.ColorMap, uCopTags);
        RethinkDisplay();
    }
}
Is there anything obviously wrong with this? How can I change the 4th bitplane on the DblPAL monitor?

PS: I tried opening a second child-screen, but that way I lose about 3 scanlines between the two screens, and it introduces a few other quirks I'd have to work around. I'm mainly interested in what's wrong with my copper list.
BSzili is offline  
Old 23 August 2016, 10:44   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,521
Perhaps your copper list triggers chipset "feature" that causes DMA pointer register write to do nothing (written value goes nowhere) if exactly following cycle is DMA fetch that uses same pointer register. Does anything change if you modify order of bitplane register writes?

(Emulation copper and dma debugger are nice tools to debug these kinds of copper list problems)
Toni Wilen is online now  
Old 23 August 2016, 14:49   #3
BSzili
old chunk of coal
 
BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 1,290
You are onto something, reversing the order of the for loop appears to have fixed the problem! Thanks for the help!
I'll check out the debugger too. It will come in handy the next time I run into something like this.

Last edited by BSzili; 23 August 2016 at 19:40.
BSzili is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
reaching bottom screen with Copper sodapop Coders. Asm / Hardware 21 09 March 2016 19:22
Freeze on changing screen resolution using uaegfx gryf support.FS-UAE 2 06 February 2016 16:28
Stuck with corrupt screen after changing res oople support.Apps 1 17 May 2012 21:06
Full screen 'copper' flashing Jesus On-e' Demo only after v1.6+ prof72 support.WinUAE 5 10 August 2010 17:05
Copper color-changing restrictions? Dan Locke Coders. General 24 01 February 2010 03:00

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:28.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06594 seconds with 15 queries