Bitwise charachter rotation.
Hi everyone, I'm new to the forum but have been developing many boards with the prop chip for the past 4 years. Mainly commercial items.
I have a problem (what a surprise) and I thought I ask in here instead of bugging chip since I know he is deep into development right now.
I would like to use the Atari and other fonts available on the net on a new led sign that I built for my kids. The only problem is that the most fonts are upright (see below) and I need it to be rotated 90* Right .... I need to do this in spin without altering the font file.
I can do most of the coding, but I am getting lost with spin's bit-wise ops (i guess I have too many languages in my brain,...).
Here is the problem...
I need to convert this:
byte byte %00000000 ' ........
byte byte %00111110 ' ..#####.
byte byte %01100000 ' .##.....
byte byte %01100000 ' .##.....
byte byte %01101110 ' .##.###.
byte byte %01100110 ' .##..##.
byte byte %00111110 ' ..#####.
byte byte %00000000 ' ........
to this:
byte byte %00000000 ' ........
byte byte %01001110 ' .#..###.
byte byte %01001110 ' .#..###.
byte byte %01001010 ' .#..#.#.
byte byte %01000010 ' .#....#.
byte byte %01111110 ' .######.
byte byte %00111100 ' ..####..
byte byte %00000000 ' ........
using spin ....
the font is stored in a pointer to the array definition called font and I typically address the array as:
font[(start_pos*8)] ' first line of selected char
font[(start_pos*8)+1] 'second line of selected char
and so on ... Hope this makes sense ...
I'd like to have sub called something like
sub RotateChar(which, start)
where which is the start of the first character line in the font array and start is the starting location to an 8 byte wide array ...
Your help is appreciated of course.
Thank you.
Alex
I have a problem (what a surprise) and I thought I ask in here instead of bugging chip since I know he is deep into development right now.
I would like to use the Atari and other fonts available on the net on a new led sign that I built for my kids. The only problem is that the most fonts are upright (see below) and I need it to be rotated 90* Right .... I need to do this in spin without altering the font file.
I can do most of the coding, but I am getting lost with spin's bit-wise ops (i guess I have too many languages in my brain,...).
Here is the problem...
I need to convert this:
byte byte %00000000 ' ........
byte byte %00111110 ' ..#####.
byte byte %01100000 ' .##.....
byte byte %01100000 ' .##.....
byte byte %01101110 ' .##.###.
byte byte %01100110 ' .##..##.
byte byte %00111110 ' ..#####.
byte byte %00000000 ' ........
to this:
byte byte %00000000 ' ........
byte byte %01001110 ' .#..###.
byte byte %01001110 ' .#..###.
byte byte %01001010 ' .#..#.#.
byte byte %01000010 ' .#....#.
byte byte %01111110 ' .######.
byte byte %00111100 ' ..####..
byte byte %00000000 ' ........
using spin ....
the font is stored in a pointer to the array definition called font and I typically address the array as:
font[(start_pos*8)] ' first line of selected char
font[(start_pos*8)+1] 'second line of selected char
and so on ... Hope this makes sense ...
I'd like to have sub called something like
sub RotateChar(which, start)
where which is the start of the first character line in the font array and start is the starting location to an 8 byte wide array ...
Your help is appreciated of course.
Thank you.
Alex
Comments
Thank you kuroneko very much.
welcome to the forum. It was interesting to see you mention that you were developing a number of commercial products with the prop. Do you want to share with us what they are?
RS_Jim
Here it goes ... Take big breath ...
I started developing my first Z80 based single-board computer with full video, bios etc back in 1978 at the age of 14 ... (skipping forward >> ) .... I started designing vertical market products in late 2007 with the PX8 (prop) chip and currently have developed the following: GSM/GPRS Telemetry Devices, GPS/GPRS Trackers, Wifi Trackers, Peltier Device Controllers, Overhead Video Displays, OBDII/GPRS Controllers, OBDII/Video Controllers, uBUS network controllers (proprietary network based on RS485), GSM/GPRS/GPS System Development Boards, Fiber Optic network controllers for in-vehicle communications, vehicle fuel injector controllers, vehicle immobilizers, plus many others (which I am doing for other companies and can't really disclose right now due to NDAs) - all uses the PX8 as it's main CPU, and some have up to 3 PX8 within one board.... I am, like many of you, eagerly awaiting the prop-II as I have request for video projects designs which needs high resolutions and more colors (I'm currently doing this with FPGAs) ... All my PX8 products are sold in vertical markets to other companies (I do custom hardware/firmware design for a living)...
...and breath out.
The GSM/GPRS/GPS System Development Board i mentioned above is something that I could release as open source to others in the forum if there is enough interest, as that was created in my spare time off the corporate clock... It basically allows you to use the SIM548C module (which we import in bulk) to create custom trackers and loggers. It has the socket for the module itself, GSM and GPS antenna holder, a few LEDs and switches as well as a PX8 with video output and an i/o port expansion. Perfect for development work ...
The LED driver project is something I did yesterday for my son (project is now finished). I basically took an old, not working led sign which I bought on eBay some years ago (it was one of the type that can be powered in the car at 12v) removed the main cpu, which was some sort of old atmel out of production cpu, and wired a prop chip to the row and columns to strobe the display (not groundbreaking technology) one hour later i had a fully functional super smooth, no flicker led sign :-) ... and not you can now have any of the many .c64 fonts as a direct drop in without modifying any code ... Having the prop attached to it, allows you to connect it to a pc and see chats (or anything really that you can send via USB or serial) scrolling across in big fat letters ...
Hope that gives you an idea of some of the things I do with the prop ...
I am not a very frequent visitor to the forum, but I do come by now and then to keep up with what's going on ... so I apologize if my replies are or will be slow ... My time is taken up mainly with work and family (I guess I am lucky that my hobby is my job) ...
Take care,
Alex
That is an impressive list. I will put a note on Jay Kicklighter's thread to see your thread. I for one would be interested in hearing more about the GSM/GPRS/GPS development board. It sounds like it might be an interesting thing to use for Robotics.
Jim
No worries, thanks. ... I'll clean the GSM/GPS project up and will setup a page for it. It was quite hard at the beginning working on trackers without a decent development board so this was a saver ... Anyway, I'll post the link here in a week or so to some pictures etc so that you can see what it is and how it all sizes up ...