Copying Font to RAM
marcwolf
Posts: 38
I was wondering if it was possible to copy the ROM Font into RAM so one can then modify some of the characters.
For certain reasons I'd love to make the accented characters into something else.
Has anyone done something like that?
Many thanks
Dave
For certain reasons I'd love to make the accented characters into something else.
Has anyone done something like that?
Many thanks
Dave
Comments
Copying the entire ROM Font can be done, but that would eat up a lot of memory...
(As an aside, I'm starting work on a Flash Point driver that will hopefully let people use different fonts from external flash memory...)
-Phil
With the ROM I was thinking of changing the accented characters to Inverse characters A-Z so I could achieve the effect of side by side windows and Labels/Values
Thanks Raymon and LocalRoger of the advice. I'll be looking at the programs later to see how I can use them.
Raymond - do you have a dump of the existing rom so I can copy and modify characters
Many thanks for all of your help
Dave
Thanks for sharing but not quite what I need.
The Prop has an internal ROM font and I want to copy that so I can generate my own characters to use with Phil's Backpack project. That way I can create a set of inverse single bit characters.
Many thanks for sharing your talent thou
Dave
Ok - I have a ROM Dump of the area starting at $8000. Can some one give me a hint of how to decipher the interleaving so I can write a decoding program. I understand that its an 16x32 font so that will be 2 bytes per character row x 32 down. So that will be 64 bytes per character.
Many thanks for all of your help.
Dave
-Phil
The font is two bits per pixel, yielding 4 colors.
00 = background
01 = pixels unique to one character
02 = pixels unique to the other character
03 = pixels common to both.
To display nothing, set all colors to the background. To display one character, set color 01 and 03 to the desired color for that character, and set 02 to the background. To display the other character, set color 02 and 03 to the desired display color, and set 01 to the background color.
To invert, set the background color as the character color, and the desired character colors to the background color.
Many thanks Phil.. I did not think of that approach and it would make it easier. Being a complete NewBee to the Prop (though I do program other processers) and with the information that PotatoHead kindly provided I should beable to work this out.
I have looked throught the Overlay Spin code and I can see a function SetPair, so I could use that with a simple invert function, possibly even modify your code to give it the base address of the character(s) and get it to invert for me. Yes I know I will be grabbing 2 characters at a time but I can live with that.
So in psuedo code it would be.
AddrOfChar = $8000 ' Address of Char Pair I want to invert
TempOfChar = $4000 ' Location to store inverted data
For Pos = 0 to 31
CharPart = Pointer(AddrOfChar + Pos) ' Get the ROM part
Pointer(TempOfChar + Pos) = !CharPart ' Set the UserDef part
Next Pos
SetPair (xxxx, $4000) ' Send the UserDef part to the Overlay
Now xxxx would be... Thats what I'm not sure of.
Many thanks
Dave
-Phil
I am planning to use your custom Glyph function, but I noticed that you also had another function called
SetPair which will accept characters pairs in the same format as the current Bitmap ROM.
So to invert a character pair I would
1. Goto the start of the character pair in the ROM
2. Read in a byte
3. Bitwise NOT the byte
4. Save it in temp area
5. Goto 2 until all bytes in character pair has been processed
6. Call SetPair(XXXX, AddressofTemp)
Now I am unsure of what I would put into XXXX
Using the SetPair would mean I would not need to decode and then re-encode the character pair.
Many thanks for your advice
Dave
Been very busy with work and a costuming convention. I wrote a program to basically reverse engineer the Prop font and turn it into the glyph format that Phil Pilgrim used, exvept in reverse format. That way if you need to have certain characters in reverse you can
This is a text file and should not be directly imported into the SPIN application, but rather cut and paste the characters you want.
Hope this helps
Dave