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 : Maximite test ver 2.4A - with EDITING
Page 1 of 2 | |||||
Author | Message | ||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3210 |
On my travels I have been adding some often requested features to the Maximite firmware (it beats doing crosswords while hiding from the mosquitoes at night). The new version can be downloaded from: http://geoffg.net/Downloads/Maximite/Maximite_Update_V2.4A.z ip This is a test version so it might include a newly introduced bug or two. New features are: - Fixed a bug where the MOD operator did not throw an error on an attempted divide by zero. - Added the EDIT command to allow convenient editing of program lines held in memory. - Added the OPTION PROMPT command to enable customisation of the command prompt. - Added the function CWD$ which returns the current working directory on the SD card. - Added PEEK/POKE commands for manipulating memory within the PIC32 processor. - Added a preset read only variable MM.VER which returns the version number of the firmware. The syntax of the edit command is: EDIT line-number If no line number is used this command will edit the previous entry typed at the command prompt. On entering the edit mode the line will be displayed and the cursor placed at the beginning of the line. The editing commands are: Space - Step the cursor one character to the right Backspace - Step the cursor one character to the left D - Delete the character over the cursor nnD - Delete nn characters at the cursor and to the right X - Jump to the end of the line and enter insert mode I - Enter insert mode. All keystrokes will be inserted before the cursor. Use escape to exit insert mode. Use Enter (or Return) to finish editing (even in insert mode). When Enter is pressed the line is added to the program just as if it had been typed in at the command prompt. If the line number had been changed a new (edited) copy of the line will be added to memory, if it is unchanged the line will replace 'line-number'. The maximum line length that can be edited is 79 chars in VGA mode and 49 chars in composite mode. This is a temporary facility. In the future I would like to use the full keyboard keys (insert, delete, arrows, etc) for editing. The prompt option was very easy to do and consists of: OPTION PROMPT string$ Sets the command prompt to the contents of 'string$' (which can also be an expression which is evaluated when the prompt is printed). For example: OPTION PROMPT "Ok " or OPTION PROMPT TIME$ + ": " or OPTION PROMPT CWD$ + ": " Maximum length of the prompt string is 48 characters. The prompt is reset to the default ("> ") on power up but you can automatically set it by saving the following example program as "AUTORUN.BAS" on the SD card. 10 OPTION PROMPT "My prompt: " 20 NEW The new function CWD$ simply returns the current working directory as a string. The syntax of the poke command is: POKE hiword, loword, val Will set a byte within the PIC32 virtual memory space to 'val'. 'hiword' is the top 16 bits of the address while 'loword' is the bottom 16 bits. This command is for expert users only. Via the Bus Matrix the PIC32 maps all control registers, flash (program) memory and volatile (RAM) memory into a single virtual address space (so there is no need for INP or OUT commands). The PIC32MX5XX/6XX/7XX Family Data Sheet lists the details of this address space while the source code will provide the symbolic names used in the firmware and the Maximite.map file (produced after a successful compile) will list the addresses of these symbols. These addresses could easily change with each version of the firmware so programs should use the predefined variable MM.VER to determine the currently running version. For anyone who wants to play with the video memory - in this version it can be found at hiword = &Ha000, loword = &Hd250. WARNING: If you use this facility access an invalid memory address the MIPS CPU will throw an exception which causes the processor to reset - with the resulting loss of the program and data in memory. To see this effect try POKE 0,0,0 (it won't hurt your Maximite!) The PEEK function is: PEEK( hiword, loword ) Will return a byte within the PIC32 virtual memory space. See the POKE command for notes and warnings related to memory access. The read only variable MM.VER returns the version number of the firmware in the form aa.bbcc where aa is the major version number, bb is the minor version number and cc is the revision number (normally zero but A = 01, B = 02, etc). Please let me know if you find any bugs or issues. Thanks, Geoff Geoff Graham - http://geoffg.net |
||||
stuarts Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 199 |
Thanks Geoff, you need to hide from those mosquitoes. I hear they breed them big up there. Stuart Time is nature's way of keeping everything from happening all at once. |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
Thank you very much Geoff. Just so it makes it look like I am organized, if someone can verify the features that Geoff has added as working fine, and I have them in the wish list at: http://www.themaximitecomputer.com/wish-list-priority-level- poll/ Then please let me know the wish list number, and I will remove the wish from the poll, and log your username against the wish in my highly organized wish list remover procedures. I should have worked for the government. Well, I did a few times actually. But then, who didn't. Cheers Don... https://www.dontronics.com |
||||
stuarts Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 199 |
Don, edit works as advertised Option Prompt works too. Haven't had a chance to check anything else out. Stuart Time is nature's way of keeping everything from happening all at once. |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
i know this prolly is not the right place but is there any way that the function keys can be controled to act as/files/run/list/ and make them user defind... thank you...... technicians do it with least resistance |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3210 |
No, but it would make a good future feature. Geoff Geoff Graham - http://geoffg.net |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
I was thinking of writing a set of AutoHotKey macros for certain functions during the terminal operations, but it would be low on my priority list. Same sort of thing for the F keys would be nice. Cheers Don... https://www.dontronics.com |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
Thanks Stuart, I'll cross it off then. http://www.themaximitecomputer.com/wish-list-priority-level- poll/ Cheers Don... https://www.dontronics.com |
||||
VK6MRG Guru Joined: 08/06/2011 Location: AustraliaPosts: 347 |
Option prompt works perfectly. Edit works very well, no problems The poke error came up as described, and as I’m just beginning to get used to Basic programming again after 25 years not using Basic I’ll wait until I have progressed up a few levels of Basic programming greatness before trying PEEK and POKE Its easier to ask forgiveness than to seek permission! ............VK6MRG.............VK3MGR............ |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
OK, so I will get rid of wish 3 then. http://www.themaximitecomputer.com/wish-list-priority-level- poll/ "The poke error came up as described," Do I need to do anything there? I have been spending my time on hardware I/O, not on programming. I hope that I can go in that direction as soon as I get the first prototype board settled. Funny, I am having trouble explaining it all to close associates, so I hope it works out in the end. I see it as simple, but one can convince oneself very easily. All about board stacking, and addressing. Hey Don, is this good?, I ask myself. Is Don is good man, yeh! Cheers Don... https://www.dontronics.com |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
The EDITOR is a God send!!!! Whoo Hoo! Poke and Peek. Any way to execute a M/L program? I'd imagine this may stuff up the Video Generation routines. Time I learned PIC32 assembly language! You're not a Geek unless you know assembly! And if you know the machine code mnemonics off by heart, you're a Geek with a hairy chest!! |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
geoff is there any other program that can load the 4.2 hex file even if it means running in dos mode ...i dont mind ialso have dos usb drivers on a boot cd that i have made up usb 2.0 as well ...as i dont have the dot net system files sorry im behind the times i guess ...thanks ... technicians do it with least resistance |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3210 |
Learning MIPS assembly language would not be easy. The MIPS instruction set was the first to be designed for optimising compilers and gets a lot of its speed by depending on the compiler to do tricks that optimise the CPU's operation. For example, the CPU will always execute the instruction after a branch test THEN execute the branch. An optimising compiler will search both sides of the branch to find an instruction that is common to both and will place it after the test. If you are interested, here is a summary of the MIPS instruction set: www.mips.com/media/files/MD00565-2B-MIPS32-QRC-01.01.pdf A better solution would be to figure out some way for compiled C language subroutines to be dynamically loaded. The PIC32 allows code to be executed from RAM so it should be doable but it would be a lot of work and probably only one or two people on the planet would want to use that feature. I still maintain that it is better to download the source, add your own functions and recompile... that has to be better than learning MIPS assembler or me figuring out how to load dynamic modules. Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3210 |
No, the maximite firmware will only run on a PIC32 chip. Geoff Graham - http://geoffg.net |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
no i meant that i cannot upgrade to four point two from 2point 1 only have xp ser pack three..it does not have the dot net files and i only run dial up thats y technicians do it with least resistance |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
i have ran my boot disk with the maxi connected and the usb drivers find it.... technicians do it with least resistance |
||||
stuarts Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 199 |
Sparkey, the problem I see is that bootloader.exe is a windows program and the effort to create a dos version wouldn't be worth it. Stuart Time is nature's way of keeping everything from happening all at once. |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
thanks technicians do it with least resistance |
||||
James_From_Canb Senior Member Joined: 19/06/2011 Location: AustraliaPosts: 265 |
Do you know anyone with a broadband link who could download the .NET update files from Microsoft for you? You might even be able to download them through the local library. My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention. Hedley Lamarr, Blazing Saddles (1974) |
||||
stuarts Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 199 |
Sparkey, if you cant get to a library, I seem to remember that .net framework is about 30MB. even at dial up speeds, it shouldn't take much more than an hour to download. I remember downloading 400MB CD images on dialup when I had no other option. Do it now and you'll surely have it by tomorrow morning. Stuart Time is nature's way of keeping everything from happening all at once. |
||||
Page 1 of 2 |
Print this page |