Reviving the Vera project!
Moderator: MaxCoderz Staff
- Super Speler
- Regular Member
- Posts: 113
- Joined: Fri 09 Feb, 2007 2:20 am
- Location: Alpha Centuri
You mean the silhouet of the girl? That's Vera, of courseSpencer wrote:What is that icon on the titlescreen?
I know, we used that first, but hardly any text fits on the screen with it. (Which is nice for a calculator where people are used to having only one line, but not so nice for a proper console.) The 6-bit font was one of the few things we actually used from the last attempt at Vera (the "Vera Bold Font" that I drew back then) but it's way too big when you have such a small screen.Also you're not using the 6-bit word mode on the LCD? It has that mode specifically for text.
Comparison screenshots here:
http://groups.google.com/group/calc-lov ... 74673c69ab
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
Re: Reviving the Vera project!
It's fun to read how much of my initial ideas have died a horrible death in the last few months
(You could argue that the demo below has a bit of multitasking going on though )
Anyway, that's not why I'm necroposting We've got the interrupts and power on/off tamed
Note that the timer animation in the top right corner and the "Power on"/"Power off" messages are triggered by the kernel through callback handlers (this is a "userspace application" in that sense which only uses the kernel interrupt routines and doesn't have to do any interrupt voodoo magic itself, only it has been compiled into the kernel as a test so it's not a "stand alone" app in the usual sense).
Using interrupt callbacks means that the main loop which is waiting for the user pressing Enter is not handling the animation, and is not handling the power downs. You can turn the calculator off by simply pressing the ON key once (and back on by pressing the key again) and this is handled in the im 1 interrupt handler. So you should be able to turn your calculator off during assembly applications by default. And even though it doesn't get screenshotted by PTI, when the console says "Power off", the emulator actually goes off
Oh, and you can also register a callback handler for link port interrupts, but that hasn't been tested yet
For those who are interested; here's the full source of the test "application", I've added a few comments to clarify how it works:
http://vera.timendus.com/Timendus wrote:no wiki, no publicity
Haven't written a single line of C for the kernel, all die hard assembly- Investigating the possible use of C in z80 calc programming
Well, multitasking hasn't really been abandoned, only pushed away to the VM... but still...- Support multitasking (I know it can be done, so who knows, with the right tools )
(You could argue that the demo below has a bit of multitasking going on though )
Okay, perhaps this one could still happen in userspace, but it's not very likely.- "Compatibility" with Ti-OS in the sense that it should be able to communicate with normal calcs through the link port and transfer files
Anyway, that's not why I'm necroposting We've got the interrupts and power on/off tamed
Note that the timer animation in the top right corner and the "Power on"/"Power off" messages are triggered by the kernel through callback handlers (this is a "userspace application" in that sense which only uses the kernel interrupt routines and doesn't have to do any interrupt voodoo magic itself, only it has been compiled into the kernel as a test so it's not a "stand alone" app in the usual sense).
Using interrupt callbacks means that the main loop which is waiting for the user pressing Enter is not handling the animation, and is not handling the power downs. You can turn the calculator off by simply pressing the ON key once (and back on by pressing the key again) and this is handled in the im 1 interrupt handler. So you should be able to turn your calculator off during assembly applications by default. And even though it doesn't get screenshotted by PTI, when the console says "Power off", the emulator actually goes off
Oh, and you can also register a callback handler for link port interrupts, but that hasn't been tested yet
For those who are interested; here's the full source of the test "application", I've added a few comments to clarify how it works:
Code: Select all
;; === TEST_INTERRUPTHOOKS ===
;; Test adding custom application interrupt handlers
;;
;; Warning:
;; Screws up two bytes at $8000
#ifdef TEST_INTERRUPTHOOKS
; Initialize the animation variables
ld a,%00111111 ; "sprite"
ld ($8000),a
xor a ; delay counter
ld ($8001),a
; Output "Showing interrupts\nPress Enter to stop"
ld hl,test_int_str1
call console_printstr
; Set up timer interrupt callback handler
ld hl,test_int_timerhandler
call interrupt_register_timerhandler
; Set up power on callback handler
ld hl,test_int_onhandler
call interrupt_register_poweronhandler
; Set up power off callback handler
ld hl,test_int_offhandler
call interrupt_register_poweroffhandler
; Here's our excuse for a "main loop" :)
call keyboard_waitkey ; blocking waitkey routine
; Exit from "main loop", clean callback handlers
call interrupt_clear_handlers
; Jump to exit
jp test_int_done
; Timer interrupt callback handler
test_int_timerhandler:
; Execute only once every 20 calls
ld a,($8001)
inc a
cp 20
ld ($8001),a
ret nz
xor a
ld ($8001),a
; Update animation directly on the LCD
call display_lcd_delay
ld a,1
out (LCDCTRL),a
call display_lcd_delay
ld a,$80
out (LCDCTRL),a
call display_lcd_delay
ld a,$2B
out (LCDCTRL),a
call display_lcd_delay
ld a,($8000)
out (LCDDATA),a
; Rotate the "sprite"
rrca
ld ($8000),a
; Done
ret
; Power on callback handler
test_int_onhandler:
; Output "\nPower on"
ld hl,test_int_str2
call console_printstr
ret
; Power off callback handler
test_int_offhandler:
; Output "\nPower off"
ld hl,test_int_str3
call console_printstr
ret
test_int_done:
#endif
...
#ifdef TEST_INTERRUPTHOOKS
test_int_str1:
.db "Showing interrupts\nPress Enter to stop",0
test_int_str2:
.db "\nPower on",0
test_int_str3:
.db "\nPower off",0
#endif
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- Super Speler
- Regular Member
- Posts: 113
- Joined: Fri 09 Feb, 2007 2:20 am
- Location: Alpha Centuri
For anyone who'd like to play with Vera a bit, but thinks checking the source out of the repository and compiling it seems like a hassle, here's a small demo. I've added a menu so you don't have to recompile for each test and selected a few fun tests:
http://timendus.student.utwente.nl/~ver ... era_d1.zip
You should be able to throw the ROM image at any decent emulator, though I have only tested with PTI and Wabbit. Notice that, although I'm distributing a ROM image, I am not doing anything illegal, seeing that there's not a byte in that file that was written by Texas Instruments
As you can see we've got pretty much everything running and under control, except for memory management. We're debating the file system and memory allocation in the mailinglist at the moment.
Don't forget to try to turn it off and back on; I'm quite proud of how simple that's turned out without pressing 2nd and without having to be at a prompt. I really don't understand why TI didn't do it like this
http://timendus.student.utwente.nl/~ver ... era_d1.zip
You should be able to throw the ROM image at any decent emulator, though I have only tested with PTI and Wabbit. Notice that, although I'm distributing a ROM image, I am not doing anything illegal, seeing that there's not a byte in that file that was written by Texas Instruments
As you can see we've got pretty much everything running and under control, except for memory management. We're debating the file system and memory allocation in the mailinglist at the moment.
Don't forget to try to turn it off and back on; I'm quite proud of how simple that's turned out without pressing 2nd and without having to be at a prompt. I really don't understand why TI didn't do it like this
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- JoostinOnline
- Regular Member
- Posts: 133
- Joined: Wed 11 Jul, 2007 10:42 pm
- Location: Behind You
I am pretty sure they made you press second so that you could turn your calculator off during a Basic program. For example, if a program is at a Pause or Prompt state you can turn it off by pressing 2nd+ON, and you can break the program by pressing ON.Timendus wrote:I'm quite proud of how simple that's turned out without pressing 2nd and without having to be at a prompt. I really don't understand why TI didn't do it like this
That doesn't make sense, because my solution works just as well for that purpose, only it works everywhere else too.I am pretty sure they made you press second so that you could turn your calculator off during a Basic program
You mean they wanted to "save" the ON interrupt for breaking Basic programs? Could be so... But that doesn't yet explain why the silent link detection is also in the prompt code instead of the interrupt. And they could have implemented the break differently in the Basic interpreter.you can turn it off by pressing 2nd+ON, and you can break the program by pressing ON.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- JoostinOnline
- Regular Member
- Posts: 133
- Joined: Wed 11 Jul, 2007 10:42 pm
- Location: Behind You
You're right, I'm sorry
Did you try the demo, by the way?
Did you try the demo, by the way?
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- JoostinOnline
- Regular Member
- Posts: 133
- Joined: Wed 11 Jul, 2007 10:42 pm
- Location: Behind You
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
The ON key provides more functionality than simply turning the calc on and off. During linking it forces a break, while graphing it stops the grapher, and, as stated, it breaks basic programs. Further more its a very special key. It's the only one that can generate an interrupt and its not apart the keyboard matrix. That means that it will never give a false read(that's important). It's because of this special status its given more tasks than the most apparent.Timendus wrote:You mean they wanted to "save" the ON interrupt for breaking Basic programs? Could be so... But that doesn't yet explain why the silent link detection is also in the prompt code instead of the interrupt. And they could have implemented the break differently in the Basic interpreter.
The reason they probably don't allow turning off the calc when ever is probably from ram corruption. At the homescreen the calculators ram already has its checksum set, so its safe to pull out the batteries and put them back in. On boot the calc will simply perform the checksum again and compare with the one set before the shutdown. Homescreen has alot of free time so its not unreasonable to perform a checksum then, but in other places its pretty much impossible.
I don't really mind very much, seeing that it hardly does anything, but perhaps it would be good to work on public relations a bit. Do as you see fitJoostinOnline wrote:I just did, and it is nice. Would you like me to spread the news to other sites, or just leave it here?
@Jim: What do you mean by a "false read"? I'll agree that using the ON interrupt for those things makes sense, but they could just as well have been consistent in using Clear or Del as a break key, in fact that would probably make for a less complex implementation. We see people doing that in assembly applications all the time.
The checksum thing makes sense, but I didn't know the calculator keeps a checksum of it's RAM. I expect we'll be doing a proper integrity check on boot of both the RAM and the flash FS, so I don't expect any problems from that. Also, there's always the possibility of manually resetting the RAM from the boot menu if things get really screwed up.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- JoostinOnline
- Regular Member
- Posts: 133
- Joined: Wed 11 Jul, 2007 10:42 pm
- Location: Behind You