Author Topic: KnightOS Transfer Protocol  (Read 26369 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: KnightOS Transfer Protocol
« Reply #30 on: January 31, 2011, 01:52:03 pm »
In other words, guys, with KOS, think of your calc as a TI-Nspire when it comes to file formats. You could even send Gameboy ROMs without converting them. (Although I don't know if a TI-Boy SE version with a ROM menu and the emu not integrated in each ROM would be easier or harder)

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #31 on: January 31, 2011, 09:13:25 pm »
Actually, TI-Boy for KnightOS would be great, and would probably allow user's without extra RAM pages to enjoy the same great games.
And you can transfer anything you like.  Download this page as an HTML file and send it to KnightOS if you want.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #32 on: January 31, 2011, 09:17:20 pm »
Btw, is there any format you would like? Is the FLASH+RAM memory all under 2GB?

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #33 on: January 31, 2011, 09:32:06 pm »
Well under.  It's just under 2MB for calculators with missing RAM, and just over for those with.  However, I refuse to include any code whatsoever that requires use of the entire calculator's memory.  And KFS is already a well thought out format that I will be using.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #34 on: January 31, 2011, 10:16:43 pm »
Well under.  It's just under 2MB for calculators with missing RAM, and just over for those with.  However, I refuse to include any code whatsoever that requires use of the entire calculator's memory.  And KFS is already a well thought out format that I will be using.
Excellent.  I look forward to getting the protocol information.  And the code shouldn't use the entire calcs memory.  I can't remember from the specs, but I'm thinking a little over 200 bytes of RAM to use, and then whatever the USB code takes. I'll try and get some test thing working later. I'll still need the Filesystem to do for KOS, but I'll go use one of the earlier file revisions that you've posted or something.

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #35 on: January 31, 2011, 10:23:30 pm »
I can easily give 200 bytes of RAM to the cause.  However, here's what you should know about making/reading files (preliminary):
Code: [Select]
All error codes for these routines are returned in L.  I'll let you know when I get definitive values.

To open a read stream:
ld hl, FileName ; File name, including directory, such as "/os/boot.kxe"
call OpenStream ; Returns a stream ID in A.  Use this to pass into ReadStream
call ReadStream ; Takes A = stream ID, returns B is next byte
call SeekStream ; Takes A = stream ID, takes BCH = location in stream (24-bit (0xFFFFFF is EoF))
call FileInfo ; Takes A = stream ID, returns size in BCH (other details to be added later)
call CloseStream ; Takes A = stream ID

To open a write stream:
ld hl, FileName ; Filename is the full name
call CreateFile ; Takes HL is file name, returns stream ID in A
call WriteStream ; Takes A is stream ID, B is value to write
call SeekStream ; See above
call CloseStream ; See above

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #36 on: January 31, 2011, 10:25:14 pm »
I might say, that is fairly well thought out.  However, with the flash Chip, are you going to make it where files can be fragmented?  So that way, you don't have to move stuff around a whole lot and writes are faster?

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #37 on: January 31, 2011, 10:26:32 pm »
Why do you think I'm using streams instead of letting programs handle it on their own? ;)

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #38 on: January 31, 2011, 10:28:14 pm »
Why do you think I'm using streams instead of letting programs handle it on their own? ;)
Ohhh... I thought you loved Java so much that you wanted to imitate it. j/k

That makes sense.  Slightly more difficult for the routine I had in mind, but yes, that should work.

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #39 on: January 31, 2011, 10:28:58 pm »
That's not a Java standard :P that's a computing standard.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #40 on: January 31, 2011, 10:31:18 pm »
That's not a Java standard :P that's a computing standard.
Oh, I know. I was just messing with you.  Send all complaints to /dev/null. :)

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #41 on: January 31, 2011, 10:31:38 pm »
KnightOS doesn't have /dev/null :D

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #42 on: January 31, 2011, 10:40:58 pm »
KnightOS doesn't have /dev/null :D
lol, it should. And /dev/random, and such.  Does it have a /dev folder? That would be useful for... stuff.

SirCmpwn

  • Guest
Re: KnightOS Transfer Protocol
« Reply #43 on: January 31, 2011, 10:42:16 pm »
No, it doesn't.  There is little point.  The random generator is built into the kernel, and it updates the seed every interrupt.

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS Transfer Protocol
« Reply #44 on: February 01, 2011, 06:04:26 pm »
But does it have any kind of folders at all? In other words, how is the KOS Filesystem organized? (maybe i missed a thread about this?)

Oh yea as for the protocol, did you revise it already?

MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-