Home | Reviews | GUIpedia | Forum | Fun500


agumaSpark Apps
Anybody interested in making apps for Spark? If so, I need a text viewer, maybe a game or 2, some image stuff, and maybe something else. If you suggest something, you make it! :P lol have fun with this nearly impossible language! :laugh: (It's actually not that hard)
2009-04-077:44 PM

BrandonRe:Spark Apps
This dev plan worked wonders for Fun500 4 :P
2009-04-079:16 PM

pharoahRe:Spark Apps
Well to be fair, Brandon, Spark has a much more complete scripting language than f54 did.
2009-04-0810:11 AM

pharoahRe:Spark Apps
Aguma, can you tell me why I get a "Call stack pointer negative" error? [code] # Draw the window and window background PUSH0 PUSH0 PUSH643 PUSH349 PUSHSelenium 0.1 WIN PUSH1 PUSH18 PUSH641 PUSH347 PUSH0 BOXF CALL:ReadIn GETVlines WPRINT NLOP # Read the display data into RAM ReadIn: PUSHtemptext.dat OPENFILE-IN # -----Count lines in file PUSH0 readLoop1: EOF PUSH1 CMP IF LINF POP INC GOTO:readLoop1 ENDIF CLOSE DUP VARlength SETVlength ALLOC VARtxtPtr SETVtxtPtr # ===== RETURN # End the program. ONCLOSED: CLOSE END [/code]
2009-04-084:09 PM

agumaRe:Spark Apps
Oh, lol, I never finished WPRINT :P I'll check what it is if it's not that. EDIT: Oh, I figured it out. You have an extra space at the end of each line - it doesn't RTRIM$ the command when it executes it, because I was thinking you might need a space at the end of a string. EDIT2: No wait, it's an error with CALL. I'll fix that....but I don't see what's wrong with it...
2009-04-086:03 PM

pharoahRe:Spark Apps
I have noticed that this forum software adds an extra space to every line when you paste code in, not sure why but you can be sure that's not what is causing the error. I am doing something a bit weird with using a goto inside an IF instead of using one of the conditional gotos, but it's not a call so it shouldn't theoretically cause screwy things to happen with the call stack. One cool thing about having a call stack is that you can now implement loops as well by using a call stack frame to store the start of the loop, and deleting it when the loop is exited. Not that I need them, I'm fine with using GOTOS for looping, but I thought I'd plant the idea anyway :).
2009-04-087:08 PM

agumaRe:Spark Apps
I finally figured it out! I used the popcall function for every iteration of the loop, instead of before I did the loop. Well, now it works and says that you didn't have enough parameters for WPRINT. I got rid of the WPRINT command because it didn't work right and you can just do it yourself just as easily. Also, I'm going to write it again in Spark's scripting language so you can call it whenever you want in your program. Just hold on - I'll release it later.
2009-04-087:14 PM

pharoahRe:Spark Apps
I am actually not clear on what WPRINT did vs. the 2 other PRINT commands, I just did it 'cause it looked simple :).
2009-04-087:18 PM

agumaRe:Spark Apps
In that case, just use OUT / LEFT; it's not much more complicated. download: http://www.xeneth.theguiblog.com/Download/kernelb3.zip
2009-04-087:34 PM

agumaRe:Spark Apps
Hey, there's a strange thing that happens: when I open a program, it slowly drains away the memory at 4kb at a time. Why does it do this?
2009-04-087:55 PM

pharoahRe:Spark Apps
If I ALLOC some space in a script, does it get freed automatically when the script ends, so that other scripts can use the memory? EDIT: It worries me that ALLOC returns the same pointer value once I use it twice. For example if I do this PUSH2 ALLOC PUSH2 ALLOC I get 2 both times, or at least that's what I think I'm getting.
2009-04-088:00 PM

agumaRe:Spark Apps
Oh right, it still thinks it's free until you actually write values to it. And no, it doesn't free it when the script closes; that's what ONCLOSED: was for. ALLOC doesn't actually allocate the memory; it just finds the first free block of memory that's as big as you tell it to be. FREE just sets those values back to 0. Not quite malloc and free :P Can you figure out why it's draining the memory? It does that even when it's idle, and I don't think it releases the window image correctly either.
2009-04-088:14 PM

pharoahRe:Spark Apps
Okay so it only allocates memory spaces when I write to them? What if I want a memory space to contain ""? Does the system think it's not allocated? EDIT: Also, what happens if I use alloc to get an address and then the next second another script which just used ALLOC to get the same address writes to it? Something rotten would happen, no?
2009-04-088:20 PM

agumaRe:Spark Apps
Okay, I changed it so Alloc actually allocates the memory, and Free actually frees the memory. You can download it at the same URL as above - I just uploaded it over the previous file. Still nothing about my memory problem..............
2009-04-088:34 PM

pharoahRe:Spark Apps
Sorry, I don't know what's causing that. Right now I'm just trying to get my QML reader underway :).
2009-04-088:36 PM

pharoahRe:Spark Apps
I get an out of memory error when trying to allocate 2 successive blocks of 6 memory elements. I assume there's more space than that :).
2009-04-088:40 PM

agumaRe:Spark Apps
fixed http://xeneth.theguiblog.com/Download/kernelb3.zip
2009-04-088:51 PM

ToddRe:Spark Apps
Interesting design by looking at the source. It's neat but I thought you allocated memory directly and not used variables as dynamic allocation.
2009-04-0810:06 PM

pharoahRe:Spark Apps
So did I, until I checked the code. There are some advantages to this method, though. For one thing it makes it impossible for a spark app to corrupt the kernel's memory, and for another each location is a string, which makes programming easier. I think I may have hit another bug, though. My program is a bit complex by now so I won't report it until I'm sure.
2009-04-0810:16 PM

ToddRe:Spark Apps
Or just make a stable memory manager. :P That's one of my projects for the summer. Make a simple kernel for my Compaq Armada 3500 (233 MHz Pentium II).
2009-04-0810:25 PM

BrandonRe:Spark Apps
Syllable would run on that, I have a Compaq Presario with a Cyrix 233Mhz and Syllable runs pretty good.
2009-04-0911:32 AM

ToddRe:Spark Apps
How easy is it to compile the kernel? Also does it work on any file system or does it install its own?
2009-04-0912:38 PM

agumaRe:Spark Apps
Found a bug - CMP returns > or < instead of so I changed goto to look for if the result isn't =. Release soon.
2009-04-096:34 PM

agumaRe:Spark Apps
http://xeneth.theguiblog.com/Download/kernelb4.zip
2009-04-098:07 PM

BrandonRe:Spark Apps
@Todd: I didn't compile the kernel so I don't know. It uses its own FS. The install is pretty easy, it has some easy to use partitioning software and just takes a few clicks.
2009-04-109:37 AM

ToddRe:Spark Apps
Oh I see. I was reading the installation manual. Apparently "DiskManager" must be run to set up the partition. Looks fairly easy to install but I'll have trouble since my Compaq doesn't have a CD-ROM nor any extension. Unless the boot disks are setup to detect USB drives, I've got to forge for myself.
2009-04-103:10 PM

BrandonRe:Spark Apps
It can install from a USB CD-ROM, you will just need some sort of floppy or something to jump to the CD-ROM. What I did on my older machine, with a bad CD-ROM is transplant the HDD long enough to install.
2009-04-106:16 PM

ToddRe:Spark Apps
Yeah but I don't have a USB CD-ROM. :( Will it work with a USB flash drive?
2009-04-106:23 PM

pharoahRe:Spark Apps
As far as I can tell you can't install it on a flash drive yet... the project doesn't have that many developers so things are moving slowly. Your best bet would probably be to ask around and borrow a USB CD from someone.
2009-04-107:28 PM

BrandonRe:Spark Apps
Or buy one, a USB optical Drive comes in more handy than you might think.
2009-04-108:26 PM

ToddRe:Spark Apps
I'd imagine. I really should buy one though. It'd save me a lot of hassle with my tablet PCs. :P
2009-04-109:29 PM

GUIs


2021 Brandon Cornell