Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Hacking the source code
Author | Message | ||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
There are some very interesting variations coming from people who are experimenting with the source code. This is good and, in part, why I made the source open and free. I can see that in the future I will end up maintaining the standard and safe version for the standard user while others produce experimental versions for use by the more adventurous (especially on hardware like the Chipkit Max32). Because there is so much activity around modifying the source I thought it worthwhile listing my internal roadmap so that experimenters can see where my changes might overrun their changes. However, keep in mind that these are just my intentions and not guaranteed. Firstly I need to completely rewrite keyboard.c, almost everything will change as I need to change its mode of operation from polling to interrupt (CN). While I am at it I was going to scrap the old codes generated by the function and arrow keys and start afresh with a new set that will allow programmers to detect if the control or shift keys are simultaneously held down. Originally I went looking for a set of codes to emulate but the only obvious one (Windows/DOS) is so messy that it is not very useful. So, does anyone have suggestions of how the coding should work? My intention was to generate 0x81 for F1, 0x82 for F2, etc. If shift was held down bit 6 would also be set (ie, 0xc1) and so on for ctrl and alt. Second question, would this (badly) break anyone’s software? As part of this I will have to make sure that all character and string handling is 8 bit clean so this might cause minor changes elsewhere. The character generation (DrawChar.c) will also completely change as I want to implement the FONT command and loadable character sets. The loadable font could be up to 32x32 bits which means that it would be possible to draw a part destroyed alien in one character and that could make a good implementation of Invaders possible (something I would love to see). As part of this, does anyone have the original TRS-80 graphics characters in a bitmap format as used in DrawChar.c? I have some from Terry (along with a programmable character set implementation) but I am not sure if it is the full set. I also plan to implement serial i/o and that will mean a lot of changes to Files.c Timers in the PIC32 are in short supply so I need to clean up their use. In particular the MIPS core timer is only used in a couple of places and that needs rationalising I also need to bring the definitions of all the i/o pins being used into the one place. This will make it easier to port the firmware to other PIC32 devices (the 32BIT WHACKER for example). This will cause only moderate change in external.c None of this is guaranteed but I felt that an indication was better than nothing at all. Geoff Geoff Graham - http://geoffg.net |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Hi Geoff One of the cool features of the Microbee computer were it programmable character graphics, PCG. Characters from 129 to 256 could be programmed. Each character on the 64*16 screen was 8 pixels wide and 16 high. The standard characters from 32 to 128 where hard coded in the ROM, but 129 to 256 where in RAM space. You could poke 16 values into ram to program a character, then use a print chr$() command to place that character on the screen. Of course you could group characters together to make a bigger picture, and shift the numbers to give pixel smooth animation. What if the Maximite used a similar approach. Characters 129 to 256 can be programmed with poke commands, then positioned on the screen with locate/print chr(). With the pixel precision of the Maximites locate command, you could move PCG characters across the screen to give some animation. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
The only issue that I can see with the Microbee approach was that the characters have to be the same size. I was thinking of having up to 8 fonts, the first 3 would be in ROM with the others loadable. ie: FONT LOAD #5, "BIGDIGITS.FNT" You could then switch fonts. ie: FONT #5 and any PRINT statement would then use that font, you could then switch back to normal with FONT #1 The format of the font files was going to be a text file and very easy to modify. The size of the characters in a font could range from 2x2 pixels to 32x32 pixels. This could consume a lot of my memory but my plan was to draw it from the same pool used by arrays and string variables and that is quite large. Also you can hand back the memory with FONT CLEAR #5 Does that sound better? Geoff Geoff Graham - http://geoffg.net |
||||
Gadget Regular Member Joined: 22/06/2011 Location: AustraliaPosts: 70 |
Geoff, Your question about the character set, the ones i included in the mods i sent to yourself was only the 'chunky' graphics characters, there are however other characters when you poke values 0-31 to the screen memory (arrows, playing cards etc) if i get a chance I'll see if i can find out what they are. Glenn, for info what I sent through to Geoff was an extension of the existing character set and the ability to define the characters 192-255 Terry |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Yeah that makes sense, same princible but with variable character size. I like it, and the FNT file idea means members can share fonts they have created. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi Geoff, I love the idea....... Load in any FONT you want away you go. Easilly editable via a text editor... I think the IBM-PC Line drawing fonts (plus arrows etc) would be a better addition than the chunky TRS-80 fonts. Mik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
BobDevries Senior Member Joined: 08/06/2011 Location: AustraliaPosts: 266 |
Hi all, Most of my computer experience has been with the Microware OS-9 operating system. In that, the font files have a common file header (all OS-9 memory loadable files have that) and then they have the codes to load the font into system memory ((in hex) 1B2BC801) followed by the screen type; two sixteen bit numbers representing the width and height, another sixteen bit number for the length of data, and after that the binary data for the font characters. These binary data files can thus be easily modified with a font editor. I can see that a font editor will be available in the future, along with an icon editor for Nick's menu programme. My $0.02 Regards, Bob Devries Dalby, QLD, Australia |
||||
Jimbo Newbie Joined: 20/06/2011 Location: AustraliaPosts: 8 |
Geoff, I had a Disk Smith System 80, which had the same graphics character set. The graphics where generated via hardware using 6 bits), and here is section from the technical manual. You will notice that the TRS-80/System-80 Font was 6x12 pixels. Same as the Maximite. 128 Was a Blank Graphics Character, through to 191 which was a solid block. I have attached a modified copy of my DrawChar.c file, which has the graphics characters added. 2011-08-05_193017_DrawChar.zip Plus a screen shot of how it looks. |
||||
Jimbo Newbie Joined: 20/06/2011 Location: AustraliaPosts: 8 |
A reference to the special TRS-80 Characters. From the System 80 Technical manual. |
||||
Print this page |