I've been thinking further about the idea that came from AmiDog's suggestion in this topic: http://sleepingelephant.com/ipw-web/bul ... php?t=4532
My initial idea of splitting the area to 208x80+208x96+208x80 wouldn't work as the basic video-area would have to be 208x176 which is too large memory wise to fit into an area visible to the VIC together with the necessary character display. So the maximum area the VIC can see still would be 208x144 expanded by raster copy to 208x208 as such nicely using all but 14 bytes of the 4 K area. (338 character bytes for video-ram, 3744 bytes for graphics)
To still get 208x256 the display needs to be split differently:
a. 208x96 upper 4k - 156 double-size characters
b. 208x32 upper 4k - 52 double-size characters
c. 208x96 upper 4K - 156 double size characters (using same chars as a.)
d. 208x32 lower 1k - 52 double-size charactes
This means:
$1000-116b: 364 byte video ram (= 728 characters displayed)
$1300-1fff: graphics areas a+b (208x128) + swap-area for c
$0000-00df: graphics area d1 (28 characters)
$016c-$019f: 52 byte video ram (= 104 characters displayed)
$01a0-$03ff: graphics area d2 (76 characters)
Interestingly enough the memory layout leaves some free areas:
$00e0-016b: 140 bytes
$116c-$12ff: 404 bytes
Especially the latter area may well be used for simple parts of the viewer program itself.
The switch-area of 208x96 would 2496 bytes, so a raster time of (2 * 256 + 2496 * 4) * 2 = 20992 cycles. Memory usage would be (257+ 7488) * 2 = 15490 bytes.
It's probably best to put the graphics-data itself neatly at $a000-$b9ff and then have the viewer-creation program pull the data from there. The viewer creation itself would be the most difficult part. I'm thinking about doing it in BASIC first to see how it works. It would have to do the following (pseudo-code)
Code: Select all
viewer-pointer = $viewer-raster-start;
write "ldx #00" to viewer-pointer;
viewer-pointer += 2;
for value = 0 to 255
for address = 0 to 2495
if (peek($a000+address)==value) then
write viewer-pointer, "stx $1300+address;
viewer-pointer += 3;
if ($viewer-pointer == {right-moment-for-raster-switch}) then
write viewer-pointer, "{raster-switch-graphics-routine}"
viewer-pointer += bytelength{raster-switch-graphics-rotine}
end if
end if;
next address;
writer viewer-pointer "inx";
viewer-pointer++;
next value;
write "ldx #00" to viewer-pointer;
viewer-pointer += 2;
for value = 0 to 255
for address = 0 to 2495
if (peek($ad00+address)==value) then
write viewer-pointer, "stx $1300+address;
viewer-pointer += 3;
if ($viewer-pointer == {right-moment-for-raster-switch}) then
write viewer-pointer, "{raster-switch-graphics-routine}"
viewer-pointer += bytelength{raster-switch-graphics-rotine}
end if;
end if;
next address;
writer viewer-pointer "inx";
viewer-pointer++;
next value;
Comments anyone? Mike?