Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Matrefeytontias

Pages: 1 ... 3 4 [5] 6 7
61
TI Z80 / [Axe] WiredWorks, a SolidWorks-like
« on: November 30, 2012, 02:46:26 am »
Hey guys,

Here's the project I was working on since one or two months : a SolidWorks-like for the z80 calcs !

On Ti-Calc I saw that there already was one for the 68K line, so now there's one for z80 !

Here's the 0.1 beta ; it'll have many features, but it doesn't right now :P

So, here are the commands :
  • [ + ] to add a vertex. When you're in the vertex adding window, just choose the coordinates of the vertex and then click Add. For X coordinate, 48 is origin and it's 32 for both Y and Z.
  • [del] to delete the last vertex. A popup will make sure that you really want to do that.
  • [2nd] for zooming and [alpha] for dezooming
  • Arrows to rotate the object
  • [clear] to quit

There isn't any saving support yet, but I'm working on it.

You must run the program under DCS7, since it uses the AxeDCS axiom by me for the GUI stuffs.



The screen is pretty slow ; the program runs perfectly at 6MHz.

Share comments :)

62
Other Calc-Related Projects and Ideas / [Ndless] Ndless meets Bezier !
« on: November 22, 2012, 01:01:44 pm »
Hey guys !

I don't exactly know why, but I wanted to do a program working with Bezier curves somehow :P

I first tried with my 83+ and Axe, but integer numbers and parametric functions aren't good together. So I tried with Ndless :

Spoiler For Over-über-monstruously huge screenshot:


The curve is drawn depending on 4 control points, which you can move by selecting them with [ + ] or [ - ] (they are visible as 3*3 squares when they are selected) and then use the arrows. Exit with [ESC].

I wonder if I can do a game of that ...

63
TI Z80 / [Axe] [2012 Apocalpyse Contest] EndGam3
« on: November 15, 2012, 01:09:15 pm »
So, here's my entry for the 2012 Apocalypse Contest !

EndGam3 will be a 4 greyscale RPG, with a storyline inspired from the anime Eleven Eyes :)

*Insert your name here*, a guy like many others, were having a normal life in your village of *insert your village here*. Suddenly, rumours about the moon morphing into "red void" lead to unusual events, which strangely give you strong headaches ...

For now, this storyline is the only thing I made, so be sure that I'll work actively on it ;D (I doubt that I'll finish it)

I planned approximately one or two hours of gameplay, with several mini-bosses (and a big bad boss of course), and a Golden Sun-like battle system.

I'll keep this thread updated, share comments :)

64
TI Z80 / [Axe] Axometry, an Axe version of Geometry Wars
« on: November 04, 2012, 01:41:38 pm »
Hi guys !

I searched for Geometry Wars on Ti-Calc, and found the one of thepenguin77. Then I downloaded it and ...

Quote from: thepenguin77
Only for 84+, sorry.

Spoiler For Spoiler:

So, since I only have a 83+.fr, I decided to make my own Geometry Wars, and since I'm not that good in ASM, I'll do it with Axe ;D

I've done the mapping and movements engine, and I've nearly finished the shoot engine, I just have to make the bullets collide with the map. I have 8 moves directions and 4 fire directions.

But just have an eyecandy ;)



Be sure that it's faster on-calc ;D

For now, it's already 2K6 bytes in Noshell.

I'll release it later ; share comments :)

65
Axe / [Axe] Messing with 3D
« on: October 26, 2012, 05:16:02 am »
Hi guys !

I'm working on 3D with vertices ("vertex" or "vertices" ?) and I'm having precision problems (well, I think that's it). Just see :



Here's my code :

The main program :
Code: [Select]
:.VERTEX3D
:
:Fill(L3,768,0
:
:ᴱ90D3→°ScrP+2→°AngX+2→°AngY+2→°AngZ
:L3→ScrP
:
:0→AngX→AngY→AngZ
:
:‾1
:For(256)
:sin(+1→r1)→{r1+L1
:cos(r1)→{r1+L2
:r1
:End
:
:Data(‾10,‾10,‾10)→GDB1VERT
:Data(‾10,‾10,10
:Data(10,‾10,10
:Data(10,‾10,‾10
:Data(0,10,0
:
:Data(0,1,1,2,2,3,3,0,0,4,1,4,2,4,3,4)→GDB1LINE
:
:Data(0r,0r,0r)→GDB1WORK
:Data(0r,0r,0r)→GDB1CAM
:
:5→V
:8→L
:32→D
:32→F
:
:While 1
:
:prgmVERTEX
:
:DispGraphClrDraw
:getKey(4)-getKey(1)*2+AngX·255→AngX
:getKey(3)-getKey(2)*2+AngY·255→AngY
:getKey(49)-getKey(53)*2+AngZ·255→AngZ
:EndIf getKey(15)

The 3D engine :
Code: [Select]
:.Vertex and shape drawing
:
:D*sign{AngX+L1}//128→{GDB1CAM+2}r
:D*sign{AngX+L2}//128→{GDB1CAM+4}r
:{GDB1CAM+4}r*sign{AngY+L2}//128→{GDB1CAM+4}r
:D*sign{AngX+L2}//128→{GDB1CAM}r
:{GDB1CAM}r*sign{AngY+L1}//128→{GDB1CAM}r
:
:For(r1,0,V-1)
:sign{r1*3+GDB1VERT}-{GDB1CAM}r→{GDB1WORK}r
:sign{r1*3+GDB1VERT+1}-{GDB1CAM+2}r→{GDB1WORK+2}r
:sign{r1*3+GDB1VERT+2}-{GDB1CAM+4}r→{GDB1WORK+4}r
:
:.Y rotation
:{GDB1WORK+4}r→H
:‾{GDB1WORK}r*sign{AngY+L1}-({GDB1WORK+4}r*sign{AngY+L2})//128→{GDB1WORK+4}r
:‾{GDB1WORK}r*sign{AngY+L2}+(H*sign{AngY+L1})//128→{GDB1WORK}r
:
:{GDB1WORK+4}r→H
:.X rotation
:‾{GDB1WORK+2}r*sign{AngX+L1}+({GDB1WORK+4}r*sign{AngX+L2})//128→{GDB1WORK+4}r
:{GDB1WORK+2}r*sign{AngX+L2}+(H*sign{AngX+L1})//128→{GDB1WORK+2}r
:
:.Z rotation
:{GDB1WORK}r→H
:{GDB1WORK}r*sign{AngZ+L2}-({GDB1WORK+2}r*sign{AngZ+L1})//128→{GDB1WORK}r
:{GDB1WORK+2}r*sign{AngZ+L2}+(H*sign{AngZ+L1})//128→{GDB1WORK+2}r
:
:F*{GDB1WORK}r*32//{GDB1WORK+4}r→{r1*4+ScrP}r
:F*{GDB1WORK+2}r*32//{GDB1WORK+4}r→{r1*4+ScrP+2}r
:End
:
:For(r1,0,L-1)
:r1*2+GDB1LINE→A
:{{A}*4+ScrP}r//32+48→X
:{{A}*4+ScrP+2}r//32+32→Y
:{{A+1}*4+ScrP}r//32+48→Z
:{{A+1}*4+ScrP+2}r//32+32→T
:Line(X,Y,Z,T
:End

If you see anything wrong ...

66
TI Z80 / A new way to use subroutines : why not in an app ?
« on: October 09, 2012, 02:39:09 am »
Hi guys !

I was wondering with other members (including DrDnar and thepenguin77, it started here) how possible it was to define subroutines in an Axe program called into an app and call them from another classic Axe program.

So, I can say that it's possible since I did it :D



I used an Axiom I programmed on the fly called PageSwap ; it provides three functions to work with pages.

FunctionPrototypeEffect
getCurPage
Token : R>Pr(
getCurPageReturns in HL the current page
setCurPage(
Token : R>P?(
setCurPage(PAGEMake PAGE the current page
getAppPage(
Token : P>Rx(
getAppPage("APP"Returns the page of the app, or the current page if not found
appFunc(
Token : P>Ry(
appFunc(NUMReturns the adress of the NUMth func in the app. Then you can call it with (EXP)(ARGS) (make sure that you're not calling the Start func ! Also make sure that you're effectively in the app before calling funcs)

You'll find these func in the Angle menu [2nd] [apps].

Share comments :)

EDIT : added a fourth function to easily call subroutines inside an app.

67
TI-Nspire / [C] SpeedX 3D reaches your Nspire !
« on: October 05, 2012, 02:52:54 am »
Hi guys !

I'm working on my first real Ndless project in C, a port of the mobile game SpeedX 3D !

In this game, you're a ship, a man or whatever (in any case, you don't see yourself) trapped in a tunnel, and you have to run (or fly, if you're a ship ;D ) while avoiding blocks which are in the tunnel. Why are there blocks here ? Who knows ... :evillaugh:

It's the really beginning of the project, but I've already done a great part, I meant the 3D tunnel effect !



There is still this moiré I have to remove ...

Share comments, I'll update the thread often  ! ;)

For now it only works on non-CX calcs !!!

68
TI-Nspire / Mode 7 with Ndless !
« on: September 30, 2012, 07:09:50 am »
Hi guys !

I programmed a simple but cool effect of Mode 7 (like the firsts F-Zero or Super Mario Kart) with C and nSDL, and I thank that I should share it :)



On the gif the program is laggy, but it's because of my bad PC ; on-calc it's way smoother.

Spoiler For "Source code":
Code: [Select]
#include <os.h>
#include <SDL/SDL.h>

#define WIDTH 320
#define HALF_WIDTH 160 // WIDTH / 2
#define HEIGHT 240
#define HALF_HEIGHT 120 // HEIGHT / 2
#define SCALE_FACTOR 6
#define FACTOR 128 //(2<<(SCALE_FACTOR+1))
#define SPEED 4

int main(void) {
SDL_Surface *screen;
SDL_Rect pixelRect, clearRect;

int Xib;
short X0 = 0, Y0 = 0;

clearRect.x = 0;
clearRect.y = HALF_HEIGHT;
clearRect.w = WIDTH;
clearRect.h = 1;

pixelRect.h = (pixelRect.w = 2);

SDL_Init(SDL_INIT_VIDEO);

screen = SDL_SetVideoMode(WIDTH, HEIGHT, is_cx?16:8, SDL_SWSURFACE);

while(!isKeyPressed(KEY_NSPIRE_ESC))
{
for(pixelRect.x = 0; pixelRect.x < WIDTH; pixelRect.x += 2)
{
Xib = (pixelRect.x - HALF_WIDTH) * HEIGHT;
for(pixelRect.y = HALF_HEIGHT; pixelRect.y < HEIGHT; pixelRect.y += 2)
{
if( ( (( (WIDTH - (Xib / pixelRect.y) + X0) >> SCALE_FACTOR) & 1) + (( (2 * (HEIGHT - pixelRect.y) + Y0) >> SCALE_FACTOR) & 1 ) ) & 1)
{
SDL_FillRect(screen, &pixelRect, (Uint32)0);
}
}
}

SDL_FillRect(screen, &clearRect, (Uint32)0);

SDL_Flip(screen);
SDL_FillRect(screen, NULL, (Uint32)0xffffffff);


if(isKeyPressed(KEY_NSPIRE_LEFT))
{
X0 = (FACTOR + X0 - SPEED) % FACTOR;
}

if(isKeyPressed(KEY_NSPIRE_RIGHT))
{
X0 = (FACTOR + X0 + SPEED) % FACTOR;
}

if(isKeyPressed(KEY_NSPIRE_UP))
{
Y0 = (FACTOR + Y0 - SPEED) % FACTOR;
}

if(isKeyPressed(KEY_NSPIRE_DOWN))
{
Y0 = (FACTOR + Y0 + SPEED) % FACTOR;
}
}

SDL_FreeSurface(screen);
SDL_Quit();
return 0;
}

Share comments :)

69
Calculator C / [Ndless] Memory leaks happen anyway
« on: September 25, 2012, 01:02:14 pm »
Hi guys !

I'm programming in C with Ndless, and I'm confused about a thing : I used several variables, I malloc'd all my pointers, I freed them before exiting, I also SDL_FreeSurface'd all the concerned pointers and ... I still have huge memory leaks (leading to a crash) :banghead:

I post the code here, and if you can see something, please tell me :( :
Spoiler For Spoiler:
Code: [Select]
#include <os.h>
#include <SDL/SDL.h>
#include <fdlibm.h>

int main(void) {
SDL_Surface *screen;
SDL_Surface **ship;
SDL_Surface *shots;
SDL_Rect shipPos;
SDL_Rect *shotPos;

static unsigned short **shipSprites;
static unsigned short *shotSprites;

int shipAnim = 0;

int *activeShot;
int currentShot = 0;
int shootDelay = 0;
int i, j;

// Malloc for SDL_Surface *screen
screen = malloc(sizeof(SDL_Surface));
if(screen == NULL) exit(0);

// Malloc for SDL_Surface *ship[3]
ship = malloc(3*sizeof(SDL_Surface));
if(ship == NULL)
{
free(screen);
exit(0);
}
for(i = 0; i < 3; i++)
{
ship[i] = malloc(sizeof(SDL_Surface));
if(ship[i] == NULL)
{
free(screen);
for(j = 0; j < i; j++) free(ship[j]);
free(ship);
exit(0);
}
}

// Malloc for SDL_Surface *shots
shots = malloc(sizeof(SDL_Surface));
if(shots == NULL)
{
free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
exit(0);
}

// Malloc for SDL_Rect shotPos[128]
shotPos = malloc(128 * sizeof(SDL_Rect));
if(shotPos == NULL)
{
free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
free(shots);
exit(0);
}

// Malloc for int activeShot[128]
activeShot = malloc(128 * sizeof(int));
if(activeShot == NULL)
{
free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
free(shots);
free(shotPos);
exit(0);
}
for(i = 0; i < 128; i++) activeShot[i] = 0;

// Malloc for static unsigned short shipSprites[3][1408]
shipSprites = malloc(3 * sizeof(*shipSprites));

if(shipSprites == NULL)
{
free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
free(shots);
free(activeShot);
free(shotPos);
exit(0);
}

for(i = 0; i < 3; i++)
{
shipSprites[i] = malloc(1408 * sizeof(unsigned short));
if(shipSprites[i] == NULL)
{
free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
free(shots);
for(j = 0; j < i; j++) free(shipSprites[j]);
free(shipSprites);
free(activeShot);
free(shotPos);
exit(0);
}
}

#include "shipSpritesC.util"

// Malloc for static unsigned short shotSprites[49]
shotSprites = malloc(49 * sizeof(unsigned short));

if(shotSprites == NULL)
{
free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
free(shots);
for(i = 0; i < 3; i++) free(shipSprites[i]);
free(shipSprites);
free(activeShot);
free(shotPos);
exit(0);
}


#include "shotSpritesC.util"

SDL_Init(SDL_INIT_VIDEO);

screen = SDL_SetVideoMode(320, 240, is_cx?16:8, SDL_SWSURFACE);

shots = nSDL_LoadImage(shotSprites);

for(i = 0; i < 3; i++) ship[i] = nSDL_LoadImage(shipSprites[i]);

for(i = 0; i < 127; i++) activeShot[i] = 0;

while(!isKeyPressed(KEY_NSPIRE_ESC))
{
if(isKeyPressed(KEY_NSPIRE_DOWN) && shipPos.y < 204) shipPos.y++;
if(isKeyPressed(KEY_NSPIRE_LEFT) && shipPos.x > 0) shipPos.x--;
if(isKeyPressed(KEY_NSPIRE_RIGHT) && shipPos.x < 281) shipPos.x++;
if(isKeyPressed(KEY_NSPIRE_UP) && shipPos.y > 0) shipPos.y--;

if(isKeyPressed(KEY_NSPIRE_LEFT) && !isKeyPressed(KEY_NSPIRE_RIGHT)) shipAnim = 1;
else if (isKeyPressed(KEY_NSPIRE_RIGHT) && !isKeyPressed(KEY_NSPIRE_LEFT)) shipAnim = 2;
else shipAnim = 0;

if(isKeyPressed(KEY_NSPIRE_CTRL) && !shootDelay)
{
activeShot[currentShot] = 1;
shotPos[currentShot].x = shipPos.x + (ship[shipAnim]->w - shots->w)/2;
shotPos[currentShot].y = shipPos.y;
currentShot = (currentShot + 1) % 128;
shootDelay = 32;
}

for(i = 0 ; i < 127 ; i++)
{
if(activeShot[i])
{
shotPos[i].y -= 3;
SDL_BlitSurface(shots, NULL, screen, &shotPos[i]);
if(shotPos[i].y < 4) activeShot[i] = 0;
}
}

SDL_BlitSurface(ship[shipAnim], NULL, screen, &shipPos);
SDL_Flip(screen);
SDL_FillRect(screen, NULL, (Uint32)0xFFFFFFFF);

shootDelay = (shootDelay > 0 ? shootDelay - 1 : 0);
}

SDL_FreeSurface(shots);
SDL_FreeSurface(screen);
for(i = 0; i < 3; i++)
{
SDL_FreeSurface(ship[i]);
}

free(screen);
for(j = 0; j < 3; j++) free(ship[j]);
free(ship);
free(shots);
free(shotSprites);
for(i = 0; i < 3; i++) free(shipSprites[i]);
free(shipSprites);
free(activeShot);
free(shotPos);

SDL_Quit();
return 0;
}
The *.util files is the files where I fill shipSprites and shotSprites with sprites' datas. I'm not doing anything more than repetitively write "shipSprites[blah][blah] = ..."

70
Calculator C / [Ndless] Looking for math funcs
« on: September 23, 2012, 10:34:47 am »
Hi guys !

I'm working on a raycaster in C for Ndless, but I can't find these funcs :
  • cos(
  • sin(
  • sqrt(
  • fabs(
All I need is a way to use these funcs, and then I'll finish it.

Thanks by advance :)

71
TI Z80 / [Axe] Super Crate Box
« on: September 22, 2012, 10:00:48 am »
Hi guys !

Maybe you have heard of the PC and iDevices game Super Crate Box. Maybe not. Well, that's like you want ;D

Anyway, I'm porting it on z80 calcs now, using the faaamous Axe parser 1.1.2 :)



Of course, I haven't finished yet : I planned to add more weapon, make title and game over screens and more.

Share your comments :)

72
TI Z80 / AxeSh, a shell written in Axe/ASM, for Axe programmers
« on: September 18, 2012, 11:21:14 am »
Hi guys !  Using Axe (both the language and the app) and ASM, I'm making something looking like a shell, but specialized in Axe programming !

It searches through the VAT for Axe sources, displays them and provides several functions and informations on them : you can lock sources, so people can't edit them ; you can delete sources ; it displays if the source is locked or not, its size, the output program, and most of all ...

You can open the Axe app, enable Axe token hook and compile sources directly from the shell ! (yeah, these aren't Axe but ASM ;D ) And you also can compile sources in Noshell without opening the Axe app :thumbsup:

The program also recognizes libraries (programs starting with two dots), making them impossible to compile :D

The program isn't finished at all, I planned to add more functionalities like hiding sources, launch an executable program resulting of a compilation just by clicking on his source ...  Here is a list of available functionalities :
  • 17/09/2012
  •       Main menu
  •       Axe app opens from the shell
  •       Compilation of an input from the shell
  •       Token hook enabling from the shell
  • 18/09/2012
  •       Updated ! Direct compilation of the selected program
  •       Complete listing of Axe sources, including libraries
  •       Detects libraries and make them non-compilable
  •       Source locking
  •       Source deleting
  •       Source size display
  •       Output name display
  •       Lock state display
  • 19/09/2012
  •       Switch between sources and executables views !
  •       Run a nostub ASM program from the shell ! The "Run" command replace the "Comp" one in executable view.

And here is the latest screenshot (I'll update it with the program) :



The logo is quite ugly, but it's only for me having the shapes for text, I'll update it later.

73
TI Z80 / AxeDCS release
« on: September 11, 2012, 03:51:15 pm »
Hi guys !

After days of work, I finally decided to release the first version of the DoorsCS 7 GUI axiom : AxeDCS !

This axiom allows you to use DoorsCS 7 widgets and several GUI functions in order to build your own graphical interface, which was a very hard task leading to a huge program. Now you can easily display and handle text or number input, button clicking and others !

Also, for now I documented all the available functions at the AxeDCS GUI Reference page on dcs.cemetech.net. Make sure to take a look at it before starting programming !

Let me know what do you think of it, and of course you can ask questions :)

Latest download : http://www.ticalc.org/archives/files/fileinfo/450/45022.html

To use it, just add :
Code: [Select]
#Axiom(AXIOMDCS)to your Axe code, and then you'll can use AxeDCS functions ;)

Enjoy !

74
TI Z80 / PassWord, the first Axe program using the DCS7 GUI API
« on: September 09, 2012, 05:28:25 am »
Hi all !

As you maybe know, I'm working on porting DoorsCS7 GUI API to Axe programming (see the topic here), and with the current progress, I had the idea to do a proof concept program :)

So, here is PassWord, the first Axe program using the DCS7 GUI API !



You don't see it on the screenshot, but the screen turns off each time the GUI is drawn ? when launching the prgm and when you type a wrong password ; it explains the delay when I run the prgm and when I close the alert.

I'll release the axiom when I had documented it (I'm discussing it with KermMartian).

If you have any question on how the program works, feel free to ask me :)

Executable : http://mattias.refeyton.fr/espace-ti/AxeDCS/PASSWORD.8xp

The current password is 9001. You can't modify it yet because you can't compile the source without the axiom :(

75
TI Z80 / AxeDCS
« on: September 04, 2012, 11:15:27 am »
Hi guys !

I finally aborted AxiomGui to work on another project : add DCS GUI funcs to Axe. I know that several people tried to do this, but it never ended, so I try myself too.

For now, I only have one command, and it's not working properly -_-' So I also need help for this one (it's mostly due to Axe replacements, I think).

Here is the actual code (I'm using Mimas) :
Code: [Select]
dw $C0DE

; Alert(
; Displays a modal msg box with custom text

dw AlertEnd+2                       ; I use REP_NEXT twice
db %00001000                      ; only for DoorsCS
db $BB,$1B                            ; normalpdf(
db 0                                       ; inline
db 1                                       ; 1 arg

rorg 0
 push hl
 inc hl
 inc hl
 inc hl
 call sub_Length
 ex de,hl
 push de
 call OpenGUIStack

 REP_NEXT                            ; db $7F \ rorg $-1

 ld hl,SmallWin
 ld de,WinButtons-SmallWin
 ld a,GUIRSmallWin
 call PushGUIStack
 
 REP_NEXT

 ld hl,WinButtons
 ld de,AlertEnd-WinButtons
 ld a,GUIRWinButtons
 call PushGUIStack
 
 pop de
 pop hl
 inc de
 inc de
 inc de
 ld a,GUIRText
 call PushGUIStack

 ld hl,0
 call GUIMouse
 ret

exitAx1:
 call ResetAppPage
 ret

SmallWin:
db 7,7
db $E0,$B0,$90,$90,$F0
db " ",0

WinButtons:
db %00100000
dw 0
dw 0
dw exitAx1

AlertEnd:

dw 0                                     ; AXM_END

; token hook
dw $03E0                             ; hnormalpdf
db 6
db "Alert("

The only arg of this func is a data containing a GUIRText datas :
Code: [Select]
:.AXEDCS
:#Axiom(AXIOMDCS)
:Data(0,0,0)"Bonjour"→GDB1
:Alert(GDB1


Here is a screen of it running :



Once the mouse freezed, I resetted manually Wabbitemu ; on my real calc it freezes, and that's all.

If someone can help me ..?

Pages: 1 ... 3 4 [5] 6 7