Splicing Xlib into a program

Moderator: tr1p1ea

Post Reply
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Splicing Xlib into a program

Post by L4E_WakaMol-King »

Ok, I'm new to this site and relativly unfamiliar with Xlib, so if this suggestion makes no sense, feel free to ignore it. I haven't programmed anything in BASIC in a long time, so perhaps times have changed.

Right now, if I understand this project correctly, one needs to have Xlib on one's calculator to use the Xlib functions, right? If so, I had an interesting idea for a neat feature you might add. I don't know if it's even possible, but it would be cool if it were.

Could you create a program that splices the Xlib code into a basic program itself? Instead of having two programs, the actual program and Xlib, could they be combined into 1? Perhaps you could create a program that takes a finished BASIC program, write-protects it, and then adds the Xlib code right into the BASIC program itself, so that the Xlib functions could be used without another program present, and so that the developer could distribute just one single program?

I'm no expert with Z80, and I don't know much about apps (Xlib is an app now, right?)... so I don't know if this is even possible. But if it is, I think it would be a really neat addition.

The real questions at hand are: Can you put ASM and BASIC code into a single program? Obviously, you can't just cut and paste code, but is there any way that the two could be mixed into one unit? The other question is whether or not this would actually be useful enough to do, even if it were possible. That's up to you and the developers that use Xlib.

Anyway, I may look like a total moron for saying this, but if it's possible, I think it would be quite neat.
Image - Now Under Development - [Progress]
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Well i dont really think that is possible. Maybe with some serious hacking and slashing and would most likely end up being the equivilant of having ASM prgms which is slower than xLIB.

Its probably easier (especially for me :)) to just have it how it is ... installing xLIB isnt too hard is it?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

It's really not that difficult to install... put it on your calc, open xlib, press 1, then 3. Done.
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

If the person/noobs on ticalc can't figure it out then oh well! I make games/programs for my enjoyment only :D.
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Now that many games are being written for xLib, people will grow more used to it, since they will need it to play hybrid games.
Image


"You're very clever, young man, but it's turtles all the way down!"
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

dysfunction wrote:Now that many games are being written for xLib, people will grow more used to it, since they will need it to play hybrid games.
it would be cool if Xlib was a full fledge basic game shell
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

If it were, you might be able to implement some functions to run basic programs from the archive (or at least some sort of memory management program to copy only what is needed to RAM at a time).

Limited RAM combined with the inability to archive programs from other BASIC programs was always the thing I hated most about BASIC.
Image - Now Under Development - [Progress]
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I dont see any real need to make it a shell, and the latest feature i implemented was the ability to run archived BASIC programs.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

still, if it were that way then basic could be run like asm with mirage...as in crashes that don't erase your games...which would be the greastest change to basic since sprite libraries
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm

Post by CompWiz »

Actually, although I don't know the practicallity of L4E_WakaMol-King's idea, it sounds good. I give games to many people at my school, and they know very little about the calc. If a game's controlls are not immediately obvious, or the purpose of the game not very clear, no one will play it. Because of this, I can only give out the most basic and common games like phantom star, phenix, mario, uncle worm, tetris, etc. I would hate for many people to miss out on great xlib games because you have to install something.
In Memory of the Maxcoderz Trophy Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

which is why an available xlib "shell" would be awsome...plug and play for the peons.
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

i agree with CompWiz. Most ppl at my school don't like having extra programs. It's apparently not very cool to have to scroll through so many program names. But hey, it's just one extra program. (i think most ppl will forget to turn it off that's all, esp. when they're not suppose to play in class)
Image Image Image
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

That was why I made the suggestion... Using Xlib is easy if you know what you are doing with a Calc, but if you dont know--and the majority of people who just fiddle with their calcs in math class don't--it can be troublesome.
Image - Now Under Development - [Progress]
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

It would be really cool to have it just basic programs app., like you guys said where you could select that program and then it would install the hooks and what not, then when you exit the game you close the hooks/uninstall but it does it atuomaticly.
Post Reply