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.


Messages - Michael_Lee

Pages: 1 [2] 3 4 ... 70
16
TI Z80 / Re: Axe Interpreter
« on: December 21, 2011, 12:36:58 am »
Because I don't want people to play with broken exes, here are working ones!

I made a few minor tweaks.  Double-clicking the exe now starts the interpreter, you can drag and drop a text file over the exe to try and run it, and the program will drop into the interpreter mode after a text file finishes running (so that you can do a postmortem, dissect variables, etc.)

For some inexplicable reason, you need to add a 'import pygame._views' while using pyinstaller in windows but exclude it for linux.

Download Windows version: http://dl.dropbox.com/u/10645749/axe-interpreter-windows.zip
Download Linux version: http://dl.dropbox.com/u/10645749/axe-interpreter-linux.zip

17
TI Z80 / Re: Axe Interpreter
« on: December 20, 2011, 09:15:16 pm »
Scratch that -- longer then 10 mins.  I thought I had pyInstaller or cx_freeze all set up and everything, but that doesn't seem to be the case :P.

Plus, parents are calling for dinner.

18
TI Z80 / Re: Axe Interpreter
« on: December 20, 2011, 08:51:49 pm »
If you wait about 10-20 minutes, I can make exes for both Linux and Windows.

19
TI Z80 / Re: Axe Interpreter
« on: December 20, 2011, 08:47:42 pm »
Woah, what?  What compiled code?

Go to the command line, navigate over to where the extracted axe-interpreter folder is, then type
Code: [Select]
python source/main.py --interpret
Hmm, on second thought, maybe it would be better to have double clicking open the interpreter without needed anything appended...

20
TI Z80 / Re: Axe Interpreter
« on: December 20, 2011, 02:59:01 pm »
Hmm seems interesting. I hope it runs commands exactly like the calc counterparts, although in the future it would be cool if it was extended for computer usage too, such as higher resolution and stuff. :D

This project kinda reminds me of Basic++ by Miotatsu actually. He tried making a TI-83+ BASIC interpreter in C++, but he lost the entire source. :(

Yeah, that's kind of what I want to turn this into.  Ideally, my version should be able to run Axe source code and make it look exactly as it does on the calculator, although I have a long ways to go before I hit that point :|

Changing the resolution -- that might actually be a neat idea.  I'll look into trying something like that.

21
TI Z80 / Axe Interpreter
« on: December 20, 2011, 02:33:19 pm »
Edit: Links to latest updates at bottom of post.

I was bored, so I tried making an implementation of Axe Parser in Python.  It currently only supports a very limited subset of Axe (only a few tokens, no pointers, strings, subroutines, HL madness, etc), but I thought this would be a good project to try this Christmas break.

It has both an interpreter mode, where you can type commands in on the fly, and a mode to execute from a text file.  It currently will not open 8xp files -- given the small number of tokens I support, it wouldn't even be useful at this point anyways.



This should be compatible with all major OSes, but was tested on Windows 7 and Linux Mint. 
No .exes, sorry -- you need Python 2.7 and Pygame.

To run the interpreter, type
Code: [Select]
$ python source/main.py --interpreter
To run a text file, type
Code: [Select]
$ python source/main.py myfile.txt
A full list of supported tokens and other miscellaneous details can be found in the readme.


Note: I'm not really fond of the name 'Axe Interpreter' -- can anybody think up a better one?



### EDIT -- Latest releases: ###

  • v0.3: http://ourl.ca/14554/301297
    Completely redone, now with grayscale and goto statements.  I also made a dodgeball game to demo.
  • v0.2: http://ourl.ca/14554/273474
    A bunch of new features: getKey, more pxl-commands, more math, rudimentary pointers, and more control structures.  I also made a tunnel game using the commands currently available.
  • v0.1: http://ourl.ca/14554/273054
    Slightly tweaked UI, exe only (windows and linux)
  • v0.0: [See attached]
    Initial release.  Source code only.

22
http://css-tricks.com
^That.  Contains a bunch more then CSS.

23
News / Re: Rules and positions update
« on: December 09, 2011, 02:02:18 am »
Huh.  I like these new rules.  They're definitely a lot cleaner then the old ones.

24
Math and Science / Re: Equation to graph this
« on: December 08, 2011, 09:11:55 pm »
looks like a logistic function to me.
(1/(1+e^X))
where e is [2nd] [divide]


(but don't graph with zstandard, use zoomfit) :)

Sweet, a logistic function fits the graph (and makes sense within the context of the problem I'm working with).  Thanks!

25
Math and Science / Equation to graph this
« on: December 08, 2011, 08:27:38 pm »
Ok, I feel really stupid for asking this, but what is the name and general form of an equation that would be like one graphed below?  The red line is the graph and the blue lines are two horizontal asymptotes. 

It almost sort of like an inverse tan, but I was wondering if there was another equation that would graph to something similar.

26
Axe / Re: Curves in Axe
« on: December 07, 2011, 01:46:46 am »
I once made a Bezier curve drawer based off of an algorithm I found here: http://freespace.virgin.net/hugo.elias/graphics/x_bezier.htm.

To elaborate on Builderboy's point, you could calculate the the precise locations of the points by either stepping through an equation such as a parabolic or sinusoidal one, or alternatively use an algorithm such as the Bezier curve (which I guess is sort of like stepping through an equation, except cooler.)

27
Axe / Re: I need help: Bits, bytes, and exponents
« on: November 27, 2011, 02:13:21 pm »
To read a bit from a byte, use the Euler's e.

From the Axe documentation:
Quote
EXP1eEXP2

Gets the expression2-th bit of the 8-bit number in expression1. Unlike assembly, the leftmost bit (high order) is bit 0 and the rightmost bit (low order) is bit 7. The bit checking is modular. That's the Euler's constant "e".

So if we have
Code: [Select]
9->{L1+1}    .In bits, 0000 1001

For(A,0,7)
    Text(A*8,10,Ae{L1+1}>Dec)
End
...The screen would display something like
0 0 0 0 1 0 0 1

The '^2' (the small exponent 2 token) can multiply a number by itself once, and 'e^(' (e to the power of token) can multiply two to a given power, but I can't seem to find anything about actual exponents in the documentation (unless I'm being stupid).  Hmm...

28
TI Z80 / Re: Untitled Grappling Hook Game (for now)
« on: November 26, 2011, 11:27:39 am »
With Zedd, couldn't you theoretically make the ceiling and floor part of the tilemap and make any protrusions moving objects?

29
Axe / Re: Free RAM and drawing stuff
« on: November 22, 2011, 01:44:11 am »
Two things I must mention. First, buffers are 768 bytes. Second, creating a variable of size 766 in A and storing a value to A+766 will corrupt whatever is next in memory.
Ah, you're right.  I was just copying down the numbers/examples that were used before.  Whoops.

Why is 3 being stored there, anyway?
No reason.  Prime numbers are cool, I guess.

30
Axe / Re: Free RAM and drawing stuff
« on: November 21, 2011, 12:11:30 am »
Just an FYI, if you absolutely needed more free ram and all the buffers are taken, you could create an appvar and use that:

Code: [Select]
getCalc("appvMYAPPV", 766)->A
3->{A+766}
DispGraph(L3,A)^^r

You could also do something like
Code: [Select]
Buff(766,0)->A
3->{A+766}
DispGraph(L3,A)^^r
...although you'd be adding the buffer directly to the program itself (inflating its size by 766 bytes) + I don't think you can modify buffers you have inside the program if you turn your program into an app.

Pages: 1 [2] 3 4 ... 70