Author Topic: FileSyst  (Read 21292 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: FileSyst
« Reply #15 on: January 06, 2013, 11:55:08 pm »
Looks pretty nice and interesting. Also off-topic: Is GrammerOS an actual OS or is it a shell like MirageOS or DCS?

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #16 on: January 06, 2013, 11:56:01 pm »
My goal is to make it an actual OS. Grammer 3 will be more like a shell with a few extra features.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: FileSyst
« Reply #17 on: January 06, 2013, 11:56:03 pm »
Command prompt O.o
Nicely done!
Sig wipe!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #18 on: January 07, 2013, 12:08:37 am »
I am only using 8 of the FileSyst commands to do that, too :D I wanted to add in a file icon editor, too, but I haven't gotten to that yet XD I have the BASIC code in my B4000 program because that edits the player icon.

I wish I had some actual games to create that use the filesystem, though. It would be easy to store highscores and stats as well as subprograms into folders that you name after the game. Plus, it would be nice to show off the app and figure out what commands I need to better integrate FileSyst with BASIC.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #19 on: January 08, 2013, 01:20:52 am »
I won't be releasing an update since I got caught up with other issues (and I didn't have computer access most of the day). I modified the AFA() command (Add File Association) so that it would check if the file association has been made (basically, it won't make the same association twice, that is redundant and takes up memory). I also added RFA() (Remove File Association) and I have started work on the OPEN() function, which opens files based on file associations. I am currently coding in all of the default stuff, so ION programs will open with either DoorsCS7, MirageOS, ION, or Noshell, for example. You can also do something like AFA( Game,'BATB') and then when you do OPEN( Game), FileSyst will install the BatLib hook before running the game. The filetypes I plan to add as defaults:

ION
MOS (MirageOS)
DCS7 (anything DoorsCS7 can run)
DCS6
C3 (Celtic3)
OMNI (Omicalc)
XLIB (xLIB)
BATB (BatLib Basic)
BAT (BatLib assembly)
GRAM (Grammer programs)

I will probably add more later, but those are my main concerns I am testing DCS7 first.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: FileSyst
« Reply #20 on: January 08, 2013, 09:37:26 am »
Looking nice :D I find the text display in the command prompt too slow though. The manual takes a while to show up entirely.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #21 on: January 08, 2013, 09:39:27 am »
Yeah, I am trying to make it a fixed width-font, but since I am using BASIC, it is slow. I will probably add back in the text display commands in FileSyst to make it much faster and smoother.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: FileSyst
« Reply #22 on: January 08, 2013, 09:40:19 am »
Wait what, FileSyst is actually BASIC !? O.O I thought it was ASM :crazy:
« Last Edit: January 08, 2013, 09:40:35 am by Matrefeytontias »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #23 on: January 08, 2013, 09:41:24 am »
The program in the screenshot uses FileSyst (which is an app) to access the folders and files, otherwise, the program is coded in BASIC.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: FileSyst
« Reply #24 on: January 08, 2013, 09:42:21 am »
Oh yeah, I was speaking of the file system :P however that's a pretty awesome performance to make a command prompt in Basic O.O

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #25 on: January 08, 2013, 09:51:21 am »
Hehe, thanks :) I want FileSyst to be completely accessible to BASIC programs and programmers.

As a side note, about 9 hours ago, before I went to bed, I had made progress on the OPEN() command. I need to fix a few minor issues, but basically, if you have DoorsCS7 on your calculator and it can open a file type, OPEN() will work. I still need to program in all of the other apps and programs, though, such as for BatLib, Grammer, Omnicalc, and Axe Fusion programs.

To think of File Associatons, it is basically like adding a ".txt" or ".exe" or ".py" to the end of a file name. FileSyst does not actually check the header or contents of the program to see what it needs to be run with. Instead, if you want to assign a program the BatLib file type, for example:
Code: [Select]
dim(0
CD(Zeda:Games)
VPTR(prgmRPG, RPG)   ;creates a file that links to the program "RPG"
AFA( RPG,'BATB')        ;Add the file association  for BatLib BASIC
Return            ;Exist the FileSyst parser and return to BASIC
Then, whenever you do OPEN( RPG), FileSyst will try to install BatLib, then run the program.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: FileSyst
« Reply #26 on: January 08, 2013, 10:30:24 am »
With DoorsCS7, you can seek the 3-bytes type of the file which is at (pointer_on_file+5), so you can quickly open it with DCS7's AP. Moreover, if a file starts with BB6DC93180, then it's a DCS7 associated file and must only be opened with DoorsCS7.
« Last Edit: January 08, 2013, 10:31:00 am by Matrefeytontias »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #27 on: January 08, 2013, 10:45:48 am »
I know, but FileSyst doesn't use DoorsCS7 except for when the user wants to run a DoorsCS7 program (or some program that DoorsCS7 can run). For example, if the user doesn't have MirageOS on their calculator, but they have DoorsCS7, and they are trying to run a MirageOS program, FileSyst will open up DoorsCS7 and use its RunProg call.

Using the File Association feature, you can open files with certain apps or programs. I even plan to make it so that even BASIC programs can be used to open files o.o (For example, if you try to open up game data, you can make it auto-launch the actual BASIC game, simply by telling FileSyst that the BASIC program is what opens that file type)
EDIT:
To expand a little more, FileSyst stores files with the following format:
1 byte
1 byte
n bytes
1 byte
33 bytes
1 byte
2 bytes
n
2 bytes
n
Type (1Fh indicates it is a folder, all other types are open)
Name Size
Name
Icon (If this is -1, it is a custom icon, 0 is default, anything else is a preset)
IconData (If the Icon is not a custom Icon, this is omitted
Info (this is for info about Hidden,Locked, Shortcut, or OS var, among other things)
Fields Size
Fields Data
Data Size
File Data
Fields have a header byte so there are up to 256 different fields. Field 0 contains information about file associations, Field 1 contains a file description. If the field doesn't have any data, it is removed. If there is no field data, then Field Data is removed and Field Size is set to zero.

Field 0 is where FileSyst figures out which program  or app to open to handle the file.

Also, as an update, here is a screenie where I run the BASIC program MORPION40  (Tic-Tac-Toe) from DCS7 and DK5ION (DonkeyKong) as an ION program from DCS7.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: FileSyst
« Reply #28 on: January 08, 2013, 08:37:33 pm »
Looking nice, but can you also use it in basic programs?
And if yes, is it compatible with BatLib as it uses dim( too?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: FileSyst
« Reply #29 on: January 09, 2013, 12:43:10 am »
Looking nice, but can you also use it in basic programs?
Sorunome, that screenshot is of it being used in a BASIC program.
And if yes, is it compatible with BatLib as it uses dim( too?
The answer is yes and no. The two cannot work at the same time, but in this update I will introduce a new command OPEN() that is able to open BatLib programs (among other things). Also, a bunch of BatLib commands are provided at the moment with FileSyst, though some may be removed later.

So as to the update, I have OPEN() working for a handful of file types! These include BASIC, Assembly, xLIB, Omnicalc, BatLib, Celtic 3, Grammer, DoorsCS7 BASIC, DoorsCS7 Assembly, MirageOS, ION, DoorsCS6 Assembly. I will probably be making more adjustments, but it is pretty well functioning at the moment. On top of that it allows you to run programs that are archived and I spent a good portion of today making it so that it would return to the calling program properly. I updated prgmCMD to include the OPEN command and you can see as it opens DK5ION that this should be very useful!
EDIT: Also, I started work on a tutorial.