PropellerForth v8.01 alpha; HYDRA tidbit
After my winter sprint, PropellerForth v8.01 alpha has been posted on the project page. (I'm using Ubuntu-style version numbers, so 8.01 is the January 2008 release.)
As it says in the release notes, the version currently available there is an alpha release. It's been tested, it works, and it's probably close to the final release, but I reserve the right to make changes in the near future before pronouncing it official. In particular, the docs are not nearly complete -- I'm working on it.
Source hasn't been posted yet; still trying to figure out how best to do that.
The HYDRA board is one of PropellerForth's officially supported targets. One of its slick (but undocumented) features is how it handles the on-board EEPROM when a cartridge is inserted: it gets remapped to a higher address space, but remains accessible.
PropellerForth's EEPROM words (included in the v8.01 'full' release) support addressing multiple EEPROMs on the I2C bus, using Atmel-style device and page addressing. The visible address space is:
This opens some interesting possibilities:
I'll leave those as exercises to the reader; for now, here's a word,
To help you test it, here is the cartridge monster. (Hey, I can only type in so many dry source examples before I try to make one funny.)
(Hot-swapping cartridges on the HYDRA should work fine as long as the EEPROM is not being accessed when it happens -- just be careful to insert the cartridge straight.)
As it says in the release notes, the version currently available there is an alpha release. It's been tested, it works, and it's probably close to the final release, but I reserve the right to make changes in the near future before pronouncing it official. In particular, the docs are not nearly complete -- I'm working on it.
Source hasn't been posted yet; still trying to figure out how best to do that.
A HYDRA PropellerForth Tip
The HYDRA board is one of PropellerForth's officially supported targets. One of its slick (but undocumented) features is how it handles the on-board EEPROM when a cartridge is inserted: it gets remapped to a higher address space, but remains accessible.
PropellerForth's EEPROM words (included in the v8.01 'full' release) support addressing multiple EEPROMs on the I2C bus, using Atmel-style device and page addressing. The visible address space is:
- No cartridge: onboard EEPROM at 0x00000 - 0x1FFFF
- Cartridge: onboard EEPROM at 0x20000 - 0x3FFFF, cartridge at 0x00000 - 0x1FFFF
This opens some interesting possibilities:
- Programs could use both EEPROMs together, for 256KiB of bulk data storage.
- A reasonably simple Forth word could copy one EEPROM to the other, to clone a cartridge or back up the on-board software.
I'll leave those as exercises to the reader; for now, here's a word,
?cart
, that checks whether a cartridge is currently inserted in the HYDRA.
hex \ the base of champions
: ?cart ( -- flag )
\ Try to read base of remapped on-board EEPROM.
20000 ['] eeread catch \ Guard with catch to intercept failure
nip \ Discard the address (if failed) or the result (if succeeded), leaving exception
0= ; \ If the exception is 0 (none caught), return 'true', otherwise 'false'.
To help you test it, here is the cartridge monster. (Hey, I can only type in so many dry source examples before I try to make one funny.)
: O_O \ See, it's a face. ... well, I thought it was funny. :-P
?cart if exit then \ Don't bug the user if a cartridge is present
begin \ Loop and complain...
." CARTRIDGE MONSTER WANT CARTRIDGE" cr
1 seconds wait
?cart until \ ... until a cartridge appears
." NOM NOM NOM BURP" cr ;
(Hot-swapping cartridges on the HYDRA should work fine as long as the EEPROM is not being accessed when it happens -- just be careful to insert the cartridge straight.)
Labels: hydra, propellerforth
5 Comments:
Thanks pleased to find this site. I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
thai brides
By Unknown, at 10:22 PM
Nice looking sites and great work. Pretty nice information. it has a better understanding. thanks for spending time on it.
Hadoop Training Institute in Noida
Best Hadoop Training in Noida
By ciitnoida, at 12:24 AM
It's a very useful information you are share.
python django training in Marathahalli
python training centers in Marathahalli
python scripting classes in Marathahalli
python certification course in Marathahalli
python training courses in Marathahalli
python institutes in Marathahalli
python training in Marathahalli
python course in Marathahalli
best python training institute in Marathahalli
By chandana, at 2:02 AM
When students request for custom research paper services from us, they are guaranteed of interacting cheap term paper writers for their custom term paper writing services needs.
By meldaresearchusa, at 2:34 AM
nice blog
Internship providing companies in chennai | Where to do internship | internship opportunities in Chennai | internship offer letter | What internship should i do | How internship works | how many internships should i do ? | internship and inplant training difference | internship guidelines for students | why internship is necessary
By vinoth, at 3:19 AM
Post a Comment
<< Home