Author Topic: Khavi: Java on the Prizm  (Read 64415 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Khavi: Java on the Prizm
« Reply #90 on: September 15, 2011, 06:45:52 pm »
You should maybe also copy your progress every hour on a CD or DVD plus an extra copy on a flash drive, in case that fails too. :P

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #91 on: September 15, 2011, 07:30:46 pm »
I sound like an annoying spammy advertiser (maybe I am :P), but Dropbox is your friend. Anything I regard as important (documents, essays, projects, interesting files, etc.) I place into my Dropbox folder. (You basically install Dropbox and then put everything you want to sync in the folder, and the daemon automatically syncs it to the server.) There is no revision control (at least not that I know of for the free plan, but it may have changed).

My workflow for wxWabbitemu is pretty much: checkout from SVN, modify code in Dropbox folder, verify that the code works, and then push the changes to SVN. That way, there's no way you could lose ANY code, unless you delete the folder by accident, or the world explodes. ;)

** Admitting, I never do this for my on-calc projects. :P I want to make an iTunes like app to sync programs and apps back and forth, without the bloat...

EDIT: A portable version is available for Dropbox, if you can't install. PM me/poke me/etc.
« Last Edit: September 15, 2011, 07:31:25 pm by alberthrocks »
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Ashbad

  • Guest
Re: Khavi: Java on the Prizm
« Reply #92 on: September 15, 2011, 08:01:25 pm »
Personally, I keep things safe with a multitude of thumb drives.  Those also work well.

Either way, good luck qwerty :(

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #93 on: September 15, 2011, 10:55:21 pm »
Here's the current source for the context switcher. It's mostly completed, aside from a single call to the [currently unwritten] scheduling algorithm.

Code: (context switcher) [Select]
/* Khavi context switcher (to be located in RAM and accessed from  */
/* Uses Round robin for simplicity */

/* Table bitfields:
* First node: [Address of current linked list][Address of next linked list][registers]
* All secondary nodes: [Address of next linked list][registers]
*/

/* Should also store/reload the table if planning to implement process/thread distinction */

Start_switcher:
mov.l r2,@-r15 /* Store registers for use */
mov.l r1,@-r15
mov.l r0,@-r15
mov.l first_table,r0
mov.l @r0,r0 /* move address of current table into r0 */
add #0x7F,r0 /* Offset r0 to end of table. Needs to be tuned properly. */

mov.l @r15+,r2 /* Store r0 to table */
mov.l r2,@-r0
mov.l @r15+,r2 /* Store r1 to table */
mov.l r2,@-r0
mov.l @r15+,r2 /* Store r2 to table */
mov.l r2,@-r0

mov.l r3,@-r0 /* Store rest of registers */
mov.l r4,@-r0
mov.l r5,@-r0
mov.l r6,@-r0
mov.l r7,@-r0
mov.l r8,@-r0
mov.l r9,@-r0
mov.l r10,@-r0
mov.l r11,@-r0
mov.l r12,@-r0
mov.l r13,@-r0
mov.l r14,@-r0
mov.l r15,@-r0

stc sr,r1 /* Switch register banks */
mov.l mask,r2 /* These lines derived and modified from Linux kernel 2.6.* */
xor r2,r1
bra rest
ldc r1,sr
mask: .long 0x40000000

rest:
stc.l r1,@-r0
stc.l gbr,@-r0
stc.l vbr,@-r0
stc.l ssr,@-r0
stc.l spc,@-r0
stc.l r0_bank,@-r0
stc.l r1_bank,@-r0
stc.l r2_bank,@-r0
stc.l r3_bank,@-r0
stc.l r4_bank,@-r0
stc.l r5_bank,@-r0
stc.l r6_bank,@-r0
stc.l r7_bank,@-r0
sts.l mach,@-r0
sts.l macl,@-r0
sts.l pr,@-r0


add #-4,r0 /* Go to table to be restored */
mov.l @r0,r0
mova Start_switcher,r2


lds.l @r0+,pr /* restore system registers */
lds.l @r0+,macl
lds.l @r0+,mach
ldc.l @r0+,r7_bank
ldc.l @r0+,r6_bank
ldc.l @r0+,r5_bank
ldc.l @r0+,r4_bank
ldc.l @r0+,r3_bank
ldc.l @r0+,r2_bank
ldc.l @r0+,r1_bank
ldc.l @r0+,r0_bank
ldc.l @r0+,spc
ldc.l @r0+,ssr
ldc.l @r0+,vbr
ldc.l @r0+,gbr
ldc.l @r0+,sr

stc sr,r1 /* Switch register banks */
mov.l mask,r2 /* These lines derived and modified from Linux kernel 2.6.* */
xor r2,r1
ldc r1,sr

mov.l @r0+,r15
mov.l @r0+,r14
mov.l @r0+,r13
mov.l @r0+,r12
mov.l @r0+,r11
mov.l @r0+,r10
mov.l @r0+,r9
mov.l @r0+,r8
mov.l @r0+,r7
mov.l @r0+,r6
mov.l @r0+,r5
mov.l @r0+,r4
mov.l @r0+,r3

add #-12,r15 /* Set SP properly */
mov #8,r1 /* modify linked lists */
add r0,r1 /* Need to add call to scheduling algorithm to choose next thread/process */
mov r1,@r2

mov.l @r0+,r1
mov.l r1,@-r15
mov.l @r0+,r1
mov.l r1,@-r15
mov.l @r0+,r1
mov.l r1,@-r15

mov.l @r15+,r2
mov.l @r15+,r1
rte
mov.l @r15+,r0

first_table: .long 0x00000000 /* address of first node in linked list */
« Last Edit: September 15, 2011, 10:57:09 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #94 on: September 15, 2011, 11:00:23 pm »
So, when will LWJGL be ported so we can run minecraft? :P

Also Albert, actually there is revision control to a point: You can recover up to 5 older versions of a file that completely uploaded. That could mean weeks, days, or seconds, depending on how save-happy you are.

But then, dropbox wasn't designed as a replacement for svn. It was designed as a replacement to NFS drives.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #95 on: September 15, 2011, 11:03:15 pm »
It'll be ported when you compile the native stuff for Prizm :P
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #96 on: September 17, 2011, 09:44:04 pm »
Okay, it's been a whole two days (::)) since I posted on progress.

As it turns out, there were a few things in the old Java interpreter that didn't quite mesh with the official Sun spec, so I'm in the process of fixing those. I'm also going to be doing garbage collection a bit differently and I've started on the beast that is memory management. There will be a repository up sometime in the near future as soon as I get the project approved.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Khavi: Java on the Prizm
« Reply #97 on: September 17, 2011, 09:46:38 pm »
The project is going to sun approved? cool!



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #98 on: September 17, 2011, 09:50:16 pm »
I doubt it will ever be approved by Sun/Oracle. I'm just making it somewhat compatible with the Java Virtual Machine specification.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Khavi: Java on the Prizm
« Reply #99 on: September 17, 2011, 09:51:56 pm »
The project is going to sun approved? cool!
You'd probably have to pony up some fee to get it officially approved, but having this fit the entire spec sounds like a great idea. This looks like a really useful project -- good luck!




Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #100 on: September 18, 2011, 12:35:22 am »
It will be able to run native code inside, right? (like android can, often used for emus) That means if we can get TI to put it in 3.0.3 and later, then we'd have Asm access! :P

You know, sans ndless. (which is still awesome, but the no 3.x atm is a downer)
« Last Edit: September 18, 2011, 12:35:54 am by willrandship »

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #101 on: September 18, 2011, 12:36:56 am »
It can definitely run native code (after all, the interpreters are nothing but well documented native code that the framework was designed to handle), but it's not on the Nspire :P
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #102 on: September 18, 2011, 12:40:14 am »
Oh yeah *facepalm* I fail at memory.

Still cool though!

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Khavi: Java on the Prizm
« Reply #103 on: September 22, 2011, 06:38:52 pm »
Just so everyone knows, the Lua available will be the latest version I have available, which probably means 5.2 beta. This may introduce some problems for compilers, although I believe 5.2 is largely backwards compatible.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Khavi: Java on the Prizm
« Reply #104 on: September 30, 2011, 05:52:00 pm »
Yay! Now I can play minecraft on a calculator!
if only.
EDIT: Seriously, why am I always the one to start pages??????
« Last Edit: September 30, 2011, 05:52:20 pm by boot2490 »
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.