]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
A1000 memory power up pattern
authorToni Wilen <twilen@winuae.net>
Fri, 23 Sep 2022 17:35:32 +0000 (20:35 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 23 Sep 2022 17:35:32 +0000 (20:35 +0300)
memory.cpp

index 86a17350c68dd3c147c96491f09114151101df35..ff8f14fd892c58122b303d2c738461c5e3333b3c 100644 (file)
@@ -2625,7 +2625,7 @@ static void fillpattern(addrbank *ab)
                                }
                        }
                }
-       } else if (currprefs.cs_memorypatternfill) {
+       } else if (currprefs.cs_memorypatternfill && !currprefs.cs_dipagnus) {
                // OCS Agnus has swapped row and column compared to ECS and AGA.
                uae_u16 fillval = 0;
                for (int fillbank = 0; fillbank < ab->allocated_size / 256; fillbank++) {
@@ -2635,6 +2635,19 @@ static void fillpattern(addrbank *ab)
                                *((uae_u16 *)(ab->baseaddr + fillbank * 256 + fillrow)) = fillval;
                        }
                }
+       } else if (currprefs.cs_memorypatternfill) {
+               // A1000
+               uae_u16 fillval = 0;
+               for (int fillbank = 0; fillbank < ab->allocated_size / 512; fillbank++) {
+                       fillval = ~fillval;
+                       for (int fillrow = 0; fillrow < 512; fillrow += 2) {
+                               // Chip emulated: Generic 4256.  16 * 512x1.
+                               *((uae_u16 *)(ab->baseaddr + fillbank * 512 + fillrow)) = fillval;
+                               if (((fillrow >> 1) & 15) == 15) {
+                                       fillval = ~fillval;
+                               }
+                       }
+               }
        } else {
                memset(ab->baseaddr, 0, ab->allocated_size);
        }