Shop OBEX P1 Docs P2 Docs Learn Events
how do i use an alternative font map? — Parallax Forums

how do i use an alternative font map?

aempireiaempirei Posts: 6
edited 2007-11-21 21:03 in Propeller 1
i was looking through the VGA-1280x1024 demo and driver and i cannot find what part of the assembly code points to the base address where the ROM font is stored ($8000) i want to use an alternative font map for the fonts (ideally i'd like to just replace the top font tiles 192-255)

Comments

  • RaymanRayman Posts: 14,221
    edited 2007-11-21 19:12
    I have a program to generate user characters and a demo app that uses them here:

    http://www.rayslogic.com/propeller/Programming/InterleavedCharacter.htm

    But, this is for the 1024x768 driver and you may have to tweak a few things for 1280x1024...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-11-21 21:03
    The 1280x1024 driver is tile based, because of this the memory is viewed as blocks of 16 longs. Since each long is 4 bytes, each tile is 64 bytes long or $40 hex. $8000/$40 is $200, this is where the $200 comes from in the print method when i is computed for ASCII values $20 through $FF. To create your own subfont, decrease the case statement to $20..$BF and insert another case for $C0..$FF where the i value is constructed using the base pointer to your font. If you haven't already figured it out your font must be aligned on a 64 byte boundry (this means the 6 LSBs must be 0 for the start address of your font)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.