sprites like MJ's Trabajo Basura (not unregr. Fourspriter)
it seems to be very similar to most of the sprites used on zx-spectrum games - how would we use this kind of sprites from a zxbasic-compiler library?
na_th_an wrote:splib2 is not so integrated into z88dk when compared to SP1, so porting it to a ZX Basic library would be posible, albeit painstakingly laborious, as the assembly syntaxes are not compatible and lots of things should be made by hand.
na_th_an wrote:Besides, ZX Basic binaries aren't as fast as z88dk binaries (for obvious reasons: C is much lower level than BASIC).
boriel wrote:na_th_an wrote:splib2 is not so integrated into z88dk when compared to SP1, so porting it to a ZX Basic library would be posible, albeit painstakingly laborious, as the assembly syntaxes are not compatible and lots of things should be made by hand.
I would like to have a look at these asm code. Where can I get the src code of sp1?
britlion wrote:I ran into similar problems. I understand the concepts behind it, I just can't work out
a) where the actual assembly is
b) how it's called
c) where it's documented.
I don't speak C, which doesn't help.
AlcoholicsAnonymous wrote:One thing you do not want to do is have all the sp1 code always included in a project. This will reduce the amount of memory to the program. For example, a program that only uses MASK sprites does not need to include all the code for OR, XOR, LOAD, etc sprites in the project. z88dk has a linker that only pulls in functions that are actually called so this is how it's done in z88dk. I don't know if Boriel's compiler has a linker feature.
AlcoholicsAnonymous wrote:
The C header file 'spectrum-sp1.h' lists all the sp1 functions and data structure definitions. I am not sure if Boriel's basic has the equivalent of a struct or pointer to a struct? but something like that is necessary.
boriel wrote:AlcoholicsAnonymous wrote:Unfortunately not: I don't neither know the format of the object files z88dk uses nor know where to start.![]()
I read they're based in .elf format or the like, but other than that, I have no clue of how they are created, linked etc...
Currently, zxbasic dumps everything to assembler which is finally converted to machine code.
britlion wrote:Nope. Not even that much of proto-object oriented programming. More or less Sinclair Basic and raw assembly only - or any library subroutines that can be made from that.
AlcoholicsAnonymous wrote:britlion wrote:Nope. Not even that much of proto-object oriented programming. More or less Sinclair Basic and raw assembly only - or any library subroutines that can be made from that.
I did read in another thread some qualms about introducing pointers and struct like things but I do think this is something that has to happen in zxbasic to make it a better language -- without them it makes it difficult to do certain things. The concept of a pointer can be hidden from the programmer by using references for non-native types as is done in Java and other languages that try to insulate the programmer from the machine. Boriel will be doing exactly that with Arrays for passing Arrays to functions.
Users browsing this forum: No registered users and 1 guest