Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For developers wanting to explore FCM (full-colour mode), it can be quite a daunting journey initially, so here’s some pointers along with an ‘experimentation’ walkthrough that will let you peek and poke your way to a better understanding of FCM (smile)

...

  • I need to divide this by 64 bytes ($40) to get the char index
    (since each pixel within the 8x8 character needs one byte in FCM mode)

    • I.e., $4,0000 / $40 = $1000

  • So you need to set:

    • Screen RAM byte 0 to $00

    • Screen RAM byte 1 to $10

...

What’s all this about 16-bit character numbers?!

...

The docs for CHR16 say it enables "16-bit character numbers", when in reality, it enables “13-bit character numbers”.

Whether it's worth changing at this stage, I'd lean towards yes, it ought to change to reflect the reality and not mislead, but maybe others might feel the name is locked in now that it has gone to print 😄

Then again, the mega65-book didn't go to print yet, just the user-guide, so maybe there's hope.

So, how many unique characters/tiles do I really have?

The documentation describes it as “Support for up to 8192 unique characters”:

...

Theoretically, that is true. We learnt earlier that we can refer to “13-bit character numbers”, which means we have 2^13 unique characters = 8192.

But in reality this isn’t possible.

  • To get 8192 tiles, that'd mean you'd need the first 512KB of ram available purely to hold character data
    (64 bytes_per_char x 8192 chars = 512KB)

  • …but the MEGA65 is only fitted with 384KB of chip ram, so that gives us a max of 6144 tiles
    (384KB / 64 = 6144)

  • …and some of that ram is going to be needed for the program's code and data, maybe kernal/basic needs too, so would likely end up less than that remaining too

  • Ok, I can now see why some folks here discussed in the past how fcm was a bit of a luxury and why many of them were more inclined to ncm mode 🙂

How many unique tiles/characters do I need to fill the screen?

So in FCM-mode:

  • To fill a 320x200 screen with unique tiles, you'd need 1000 tiles, sounds do-able 🙂

  • To fill a 640x400 screen with unique tiles, you'd need 4000 tiles, a bit more challenging, probably would be an 'assembly-only' thing, consuming BANKS 2,3,4,5 with character data. (no chance in basic)

For NCM-mode, I think all those stats halve and you get more breathing room.

FCM Experimentation via the UART monitor

...