** New Frontiers in VIC-Hires-Graphics, Part 9

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

** New Frontiers in VIC-Hires-Graphics, Part 9

Post by tokra »

Sadly, no one seems to have noticed back in 2010 that Part 9 of this series was still missing, while Part 10 explained the FLI-mode (72x256) which was expanded even further by Mike's VFLI-mode with the hardware-mod.

However before that idea came to fruition I mused about enhancing the just released MAXIGRAFIK-mode to 8x8 color blocks instead of the 8x16 blocks of MAXIGRAFIK. I realized that this would need a complete new addressing scheme (again) since the video-RAM would be twice as large (832 bytes instead of 416) and as such lots of graphics data would have to be handled in the zeropage for speed. Before I had time to think more about it, Mike came up with this layout:

Code: Select all

$1000 .. $133F Screen

  Display:                          Update:

  Line  0 $1340 .. $140F (1)        Line  2
  Line  1 $1410 .. $14DF (1)        Line  2
  Line  2 $0000 .. $00CF            Line 27
  Line  3 $14E0 .. $15AF (1)        Line  5
  Line  4 $15B0 .. $167F (1)        Line  5
  Line  5 $0000 .. $00CF            Line 27
  Line  6 $1680 .. $174F            Line  8
  Line  7 $1750 .. $181F            Line  8
  Line  8 $0000 .. $00CF            Line 27 + Line 28
  Line  9 $1820 .. $18EF            Line 11
  Line 10 $18F0 .. $19BF            Line 11
  Line 11 $0000 .. $00CF            Line 28
  Line 12 $19C0 .. $1A8F            Line 14
  Line 13 $1A90 .. $1B5F            Line 14
  Line 14 $0000 .. $00CF            Line 28
  Line 15 $1B60 .. $1C2F            Line 17
  Line 16 $1C30 .. $1CFF            Line 17
  Line 17 $0000 .. $00CF            Line 30
  Line 18 $1D00 .. $1DCF            Line 20
  Line 19 $1DD0 .. $1E9F            Line 20
  Line 20 $0000 .. $00CF            Line 30
  Line 21 $1EA0 .. $1F6F            Line 23
  Line 22 $00D0 .. $019F            Line 23
  Line 23 $0000 .. $00CF            Line 30 + Line 31
  Line 24 $01A0 .. $026F            Line 26
  Line 25 $0270 .. $033F            Line 26
  Line 26 $0000 .. $00CF            Line 31
  Line 27 $1340 .. $140F (2)        Line 29
  Line 28 $1410 .. $14DF (2)        Line 29
  Line 29 $0000 .. $00CF            Line 31
  Line 30 $14E0 .. $15AF (2)        Line 0,1
  Line 31 $15B0 .. $167F (2)        .
 (Line 32)                          .
 (Line 33)                          .
 (Line 34)                          bis
 (Line 35)                          .
 (Line 36)                          .
 (Line 37)                          .
 (Line 38)                          Line 3,4

Update from $1340 .. $167F (832 Bytes, ABS) needs 4992 cycles, works within 9 char-lines.

Update from $0000 .. $00CF (208 Bytes, ZP) needs 1040 cycles, works within 2 char-lines.
Upon implementing this I noticed that by pushing so much graphics data to the zeropage there was enough raster-time left to do switches of the border/background and auxiliary-color every 4th line (so 64 raster-splits) while still maintaining comparatively good addressability of the bitmap-bytes. The color-switches are done at the exact right moment (timed with VICE), by doing a JMP instead of an STA in the bitmap. The code then writes the byte into the bitmap, sets the colors and continues where it left off to allow for the bitmap-bytes to keep their distribution pattern allowing for easier addressing. This was very cumbersome to do and I needed about a week of long evenings until it was timed out perfectly.
In the end just a few hundred CPU-cycles of 22152 total per picture where left.

Try it out for yourselves:

http://www.tokra.de/vic/208256c.zip

Download unzip, then do this (preferrably within VICE at Warp-Mode - PAL - at least 24K)

Code: Select all

load"208256c-stub.prg",8,1
poke44,112:poke112*256,0:new
load"test256.prg",8
run
Then press spacebar to see the graphic-data being filled then the color-RAM, and finally the 64 raster colors (foreground/background/auxiliary).

Once I finished this FLI-mode was already on the way and was posted in October, but I did not post the MAXIGRAFIK-COLOR mode back then since Mike said he would adapt the BASIC-expansion for it and maybe add the CHAR-command (since now 8x8 color chars were possible). But he was busy with his incredibly cool VFLI-mode and so this was put back.

I (once again) thought I had reached the VIC's limit, but then about a week before Christmas I had another idea how to increase the raster-split color-switches to each line. How this could be done when I just mentioned there was no raster-time left will be explained in Part 11. Soon :-)
Post Reply