[Featured][Beta] API - Why hasn't this been done yet?!

Here you can find side projects of the staff and great projects which we think should get extra support. (Note that featured projects are not projects by staff members of MaxCoderz)

Moderator: MaxCoderz Staff

Post Reply
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

DarkerLine wrote:Maybe the graph/home routines should be renamed to large/small text routines? I don't remember there being a distinction between graph and home screen in assembly.
That depends on what equates you use :P Many refer to graphbuffer or gbuf and the original TI documentation refers to "writing to the home screen" or the "graph screen".
Besides, it's not just a distinction between large and small text, it really does have something to do with what screen you are in. The home screen has a textshadow, you can scroll it up and down, et cetera, while the graph screen doesn't automatically wrap or scroll (unless you're using the API ;)) but you can draw things in it, graph equations, put text anywhere you want instead of at 16x8 given positions...

In other words: I disagree ;)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

I agree w/ Timendus 4 the same reasons...
User avatar
blueskies
Calc Wizard
Posts: 553
Joined: Tue 25 Apr, 2006 2:24 pm

Post by blueskies »

testing graph.output("string"), gives a range of relative branch exceeded on line 194 of 'current_api.inc' (code of kbd.readln.graph()). changing jr -> jp fixes. not sure why it gives an error in that routine (though it is called right before graph.output() in my code). Can I update in on the API website?? :D

Oh, and that reminds me, I should ask Ben to add line numbering to the TODO list for Latenite, if it's not already on there. :)

//edit - k, so I just tried editing, then updating the API code through Latenite (then changed it back because I'm not sure if it'll mess anything up). Timendus, this is so cool!
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Hahaha, thanks :)
You mean this code:

Code: Select all

api_kbd_readln_graph_done:
	ld	(hl),0
	jr	api_graph_newline
Yes, that's my mistake... should be jp because it's impossible to predict how much data will be between kbd.readln.graph and graph.newline. Please do change things if you see mistakes like this :) Could you check if it works now?

By the way, Ctrl+G is go to line in Latenite
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

My laptop crashed at home, while I'm at my parent's place, so I don't really have access to any resources or a compiler. But I wrote a few routines on paper, that I'm posting here so I don't lose them :P If anyone wants to test and debug them, go ahead :)

[Routines deleted]

I've also been working on a binary search for sorted arrays, but that's getting pretty long, so I'm starting to wonder if it'll be of any use :P Because the gain in speed of the search algorithm is being taken up by the search process, unless you have really long arrays. Which brings me to another concern, why on earth would you want to sort a list of values? If you could link those values to some other data it would make sense (sorting highscores, keys, sprites, whatever you can sort by some index or value), but the numbers themselves have no real meaning, so sorting them is pretty useless...

In other words, we should come up with something like objects or classes in assembly, that link bits of data together. I have absolutely no idea how to do that yet :) Input anyone?

The only thing I could come up with is an array like this:

Code: Select all

Highscores:
   .db 7 \ .dw name1
   .db 21 \ .dw name2
   .db 16 \ .dw name3
   .db term

name1:
   .db "Vincent",0
name2:
   .db "Ben",0
name3:
   .db "Tim",0
You could sort that and get the last pointer to find out who has the best score, or whatever. Or you could use this data structure with binary search to get a better average search time for sprites in a game (you know, a map in assembly is a collection of sprite indexes, rendering it requires you to look all the sprites up in memory and putting them on the screen).

Anyway, I'm just thinking out loud here. If anyone has some good ideas, please post them :)

[More routines deleted]
Last edited by Timendus on Mon 05 Dec, 2005 6:49 pm, edited 1 time in total.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Alright, the _puts_wrap thingy doesn't work at all (outputs garbage and crashes, probably loses it's pointer somewhere in the stack or something) and I'm not really in the mood for more z80, so I'll leave that for tomorrow. But I debugged and added the other routines, I made a new "stable" API download (this one has twice as much routines as the last stable :P) and wrote a program to quickly test most of the API functionality. Here, have a screeny with all tests on :)

Image
Last edited by Timendus on Tue 16 May, 2006 6:04 pm, edited 1 time in total.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Just great... This is pretty demotivating...

Some bitch deleted:
home.print
home.clear
home.output
kbd.readline.home

Now I'll have to restore them by hand from the stable API... This project is getting way too time consuming...
Last edited by Timendus on Tue 06 Dec, 2005 4:31 pm, edited 2 times in total.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

That's a bunch of bull shit. I demand that you require logins and you log all changes made by every screen name.
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

--Deleted this post for clarity--
Last edited by Timendus on Tue 06 Dec, 2005 4:31 pm, edited 1 time in total.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Timendus wrote:Just great... This is pretty demotivating...

Some bitch deleted:
home.print
home.clear
home.output
kbd.readline.home

Now I'll have to restore them by hand from the stable API... This project is getting way too time consuming...
:( That really sucks. At least you have them backed up, albeit not in a very easy format...

(I'll try to remember to post my routines at some point, but they probably aren't good enough).
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Hahahah, ow fuckit :P I checked my logs to see who deleted those routines, and it turned out to be a google indexing bot following the "delete" link :o
That really sucks, because that bot will probably be back sooner or later to delete the rest. So I need some brilliant ideas on how to prevent that NOW :P

Edit:
I just removed the option to delete routines. Should keep the API in one piece...

Edit 2:
The deleted routines have been restored. Hope it stays this way :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

How funny :).

BTW I have some questions.

This API will make it possible for beginners to get an easy start into ASM but will it also be useful for more advanced users like us?

I am writing a game making guide but I need to know whether I need to include this API as an essential part of it.
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

I'm not sure if the API is an essential part of game making. It could surely simplify things once the sprite routines are in place, and having a bunch of string/array routines at your disposal can also be helpful. I guess it's up to you to decide if it's essential or just useful ;)

And to quote myself :)
Timendus wrote:I think many asm users (even advanced users) will find this helpful. If I want to test something "advanced", like interrupt timing differences between PTI and the hardware or whatever, I want to do my thing, and not be bothered with the same old code that I wrote a thousand times before... In a perfect situation I'd just tell the API to set up an interrupt, write my interrupt, leave the outputting to the API, and I'd be done.
I think advanced users will use the API more for debugging or testing purposes, so they can quickly throw a program together to try something, without the hassle. I don't expect someone writing a highly optimized RPG or a shell to use API routines :)

But then again, you can never know... maybe the API will be optimized enough for any purpose in a year or so.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
qarnos
Maxcoderz Staff
Posts: 227
Joined: Thu 01 Dec, 2005 9:04 am
Location: Melbourne, Australia

Post by qarnos »

Timendus wrote:Hahahah, ow fuckit :P I checked my logs to see who deleted those routines, and it turned out to be a google indexing bot following the "delete" link :o
That really sucks, because that bot will probably be back sooner or later to delete the rest. So I need some brilliant ideas on how to prevent that NOW :P
Create a robots.txt file.

Info here: http://www.searchengineworld.com/robots ... torial.htm

It's basically a file which tells search engines which files they shouldn't index. Might be of some use to you.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Yes, I concidered that, but I'd have to disallow something like "/~api/api.php?q=delroutine" then :) And I don't like to sit and wait to see if it works properly, so I'll just leave the Delete button out. It's not neccessary anyway.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
Post Reply