Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: jacobly on April 19, 2012, 01:25:17 am
-
I have been working on a program that interprets Axe source code. Currently, I am able to compile it to computer assembly code, which I can link with a program that emulates a calculator screen. At some point, it should be able to run Axe programs directly (using JIT compilation).
So far, I have implemented enough of the commands to be able to compile most of the example programs that come with Axe. The compiler itself is not ready yet, but I do have some examples of the executables produced.
-
This is a very nice set of examples that you have managed to make work for the Axe Emulator. It definitely simplifies things by putting the calc screen into a single window (and nice Axe logo too). Did you also manually keymap the keys too? If so then well done! Hope to see more progress on this.
-
um could you explain it a bit and/or post screenies, I can't download it and I dont really get it.
-
It's compiles/interprets AXE programs to work on a PC.
Pretty nice :)
Here is a screenshot:
-
OMG nice :D :D :D
Also
niceframerate XD
edit:
is color also planned to be implemented?
-
Wow! This is quite an impressive accomplishment! O.O
Are you planning on extending the functionality given that you have the resources of a computer or are you planning to continue improving emulation to make it more similar to the calculator language?
-
OMG nice :D :D :D
Also
niceframerate XD
edit:
is color also planned to be implemented?
How could color be implemented if it interprets axe? o.O
-
erm, extra commands I guess.
Maybe also bigger screen/smaller pxls :D would allow for the TI community to boooooost computron development :D
-
An Axe Parser Extended environment I would see. Kinda like how there's Lua (PC programming language version), and TI modified it for the TI-nspire, removing and adding and modifying commands/functions.
So like jimbauwens' PCspire too!
-
^that :D I would really be creating tonsa games for pc when that happens :D
edit also O.O we would be able to write our pc proggies oncalc lol
-
i just tried it out, and it looks wonderful =D. i like how it uses steady 3/4 colour grey rather than emulating the gross 83/4 screens, too.
additional functionality would be pretty fantastic./me imagines a nice alternative for writing quick games.
it probably wouldn't be very popular outside of the community, though, what with the contrast between axe and most popular languages.
-
Wow, if you add PC-specific functions, that will be freaking awesome o.o I will forever be in love with Axe. I've never gotten to use this emoticon, but :-* :w00t: Jacobly, you are awesome, I am glad you took the time to make this o.o Now that Axe is on a computer, I see it as being a really major hit and might evolve to be one of the top programming languages. Quigibo, Jacobly, amazing o.o
EDIT: Also, how much do you have to slow the code down? If you have to slow it down quite a bit, then I would love it. That would mean I could run algorithms coded in a language I understand, very quickly.
-
+1'nd!
This is awesome! I can't wait to see more of it! ^^
-
@Quigibo: I would like to be able to have options (such as clipped/unclipped lines, accurate/approximate sin/cos, optional extra routines) so that I can improve some things while still being able to be as compatible with Axe as possible.
@Xeda: Even giving every DispGraph a 10ms delay, many games run way too fast to be playable (And this is with very unoptimized drawing code, etc. (Although the generated code is already being optimized quite a lot)).
On a side note, I do have linux executables (http://jacob.heliohost.org/calc/axe/emulator/AxeExamples.tar.gz), but the file was too big to upload.
-
I like this one really....
I'm glad I'm one of those who tested it before it was released here! :D
EDIT: for anyone who wants to test TheQuest - in the white screen you have to hit 1.
Yes, that IS my program, the quest :P And I seriously don't know how that menu bug came there (it's also in the calc version)....
EDIT 2: This is just awesome, awesome and again awesome
EDIT 3: Add special PC-comments! :D
-
Yeah, I noticed that the delay wasn't quite precise, but if you are adding that kind of delay, you should definitely make it possible to have a header that tells your programs to compile without restrictions o.o
Anywho, a few things I noticed: The compiled size is quite large compared to on calc (>400K, for the most part). Is there a way to reduce that? And is it simply because of a lot of header code or something? Also, about how easy is it to compile a source program in .8xp format to the computer executable? Is it a drag and drop kind of deal?
-
I would like to have customizable delays, but keep in mind that currently the only delays are in DispGraph variants and Pause, so all code between these instructions run at full speed.
The files are that size because they are each statically linked so that there are currently no dependencies to worry about. However, note that compiling an empty Axe program results in an executable that is 421,390 bytes. This means that the unique code produced in, for example, TheQuest.exe is approx. 10,240 bytes, whereas the calc executable is 10,465 bytes (10,240 bytes includes L1, 15 variables, and code alignment).
Currently, compiling is slightly involved, but I should be able to automate most of this when I get around to it (Honestly, the only difficulty I foresee is linking, but I can always just automatically run another executable). Also, if you drag and drop a file onto the exe, I plan to have it just run the program directly (compiling to an executable will more than likely require the use of the command line).
-
Wow, that is really amazing. I can imagine it being really useful for testing Axe programs :o
-
O.o very nice!
-
Axe is finally coming to the computer! :D
I've been waiting for this. Now I might actually achieve learning it, lol :P
-
Wow, this is seriously amazing stuff! :D Especially with leveraging SDL, using C, etc... you're crazy! :P
Not sure how hard it may be to extend this, since this *is* an emulator we're talking about. ;) I think if there was a way to add color but still have the program run normally on a calc... bah, I think I'd stick to writing a parser for Axe PC Edition.
-
As I said on IRC when I tested this before you posted about it, this seems very promising and it might be quite useful for those who want to test a game without the need of a ROM or if it's in its current form, provide a quick executable of your game for quick testing (or even with the game on ticalc?).
There are some things I wonder, though:
-How does grayscale and motion blur work compared to the calc?
-Also ashbad on SAX chatroom a few minutes ago was being curious about how does the emulator or parser operates with Axe code. To me it seems to require the source code, rather than the compiled executable, but he was wondering how do you emulate the TI-OS and if you were actually including TI-OS code in the emulator (which I doubt you would do, since I'm sure you know copyright stuff very well) to allow the emulator to run Axe programs exactly as they are on a real calc. I myself think it is possible to do an interpreter that would mimic the calc screen behavior to a certain extent like you did, although Ashbad didn't seem so well convinced. He basically found the idea of an Axe emulator useless, which I disagree with (again, maybe it's just that he just has strong biases against everything Axe-related). However I'm kinda curious too, since your emulator emulates Axe programs surpringsly well it seems. Could you give a bit more info about how it manages to run without emulating any part of the TI-OS? In any case, if everything was written on your own and you really use the axe source rather than compiled executables, then that's even more impressive to me, especially that now we can play Axe games without even compiling them.
-How does it work for Axe programs containing multiple files, such as pictures, sub-programs, etc? Are they detected?
-Will in the future it be possible to have a version containing only the emulator, where you can choose the axe project to run, like in any other emulator, for those who have many Axe programs and want to save space? Of course standalone executables are awesome too, since now we can pretty much turn our Axe games into computer games.
-Will the language be expanded in the future so if, for example, below the Axe source header we put something like ANOVA("RES":320x240:Full), your exe file uses 320x240 full screen resolution instead of 96x64 windowed and ANOVA("COLOR":256) if one wants Pt-On/Off/Change to display sprite data in 256 color mode instead of 2 (monochrome) and to allow Line/pxl commands to be useable with colors too That would basically allow someone to create actual computer games by using Axe language, so they don't have to learn a new language if they ever quit calc stuff but still want to make old skool 2D games like Mario on the computer. TokenIDE/SourceCoder could still be used to write programs for the time being, although if both won't let people create 8xp files larger than 24 KB or even 64 KB, that might be annoying.
-
-How does grayscale and motion blur work compared to the calc?
Because Axe uses high level commands for grayscale, I am able to just display it perfectly, without having to worry about dithering or blur.
-Also ashbad on SAX chatroom a few minutes ago was being curious about how does the emulator or parser operates with Axe code. To me it seems to require the source code, rather than the compiled executable, but he was wondering how do you emulate the TI-OS and if you were actually including TI-OS code in the emulator (which I doubt you would do, since I'm sure you know copyright stuff very well) to allow the emulator to run Axe programs exactly as they are on a real calc. I myself think it is possible to do an interpreter that would mimic the calc screen behavior to a certain extent like you did, although Ashbad didn't seem so well convinced. He basically found the idea of an Axe emulator useless, which I disagree with (again, maybe it's just that he just has strong biases against everything Axe-related). However I'm kinda curious too, since your emulator emulates Axe programs surpringsly well it seems. Could you give a bit more info about how it manages to run without emulating any part of the TI-OS? In any case, if everything was written on your own and you really use the axe source rather than compiled executables, then that's even more impressive to me, especially that now we can play Axe games without even compiling them.
The compiler program I wrote currently takes Axe source code and produces a computer executable. This executable does not contain the original source, nor does it contain the executable that Axe would produce. What it does contain, is native machine code compiled from the Axe source, and hand-written code for every Axe command that is currently supported (Also the calculator screen emulator). The only thing that it has in common with TIOS is that it contains the data for TIOS's fonts and tokens (This data was created by hand).
-How does it work for Axe programs containing multiple files, such as pictures, sub-programs, etc? Are they detected?
I am already able to compile programs that use multiple program files. I will definitely be able to support absorbing files, and I will probably be able to support reading and writing files.
-Will in the future it be possible to have a version containing only the emulator, where you can choose the axe project to run, like in any other emulator, for those who have many Axe programs and want to save space? Of course standalone executables are awesome too, since now we can pretty much turn our Axe games into computer games.
I plan to have a single executable. By default, dragging & dropping an Axe program onto this file will just emulate that Axe program directly, without producing an executable. However, using command line, I hope to allow you will be able to both produce small executables which require the Axe emulator executable in order to run, and larger stand-alone executables that run by themselves.
-Will the language be expanded in the future so if, for example, below the Axe source header we put something like ANOVA("RES":320x240:Full), your exe file uses 320x240 full screen resolution instead of 96x64 windowed and ANOVA("COLOR":256) if one wants Pt-On/Off/Change to display sprite data in 256 color mode instead of 2 (monochrome) and to allow Line/pxl commands to be useable with colors too That would basically allow someone to create actual computer games by using Axe language, so they don't have to learn a new language if they ever quit calc stuff but still want to make old skool 2D games like Mario on the computer. TokenIDE/SourceCoder could still be used to write programs for the time being, although if both won't let people create 8xp files larger than 24 KB or even 64 KB, that might be annoying.
I can't say for sure since I am currently focused on getting native Axe commands to work, but it is definitely possible.
-
Oh, right, I forgot you don't even need to get around LCD limitations for the grayscale. That's even better then.
And I see. That means it isn't really an emulator, though, right? Since to be an emulator, your software would have to interpret the axe source or a file containing it in its original form without having to convert it first. It's still nice, though. :) I guess it might be more of an Axe Parser for the computer or something, unless I have my definitions of emulator wrong.
Good to hear it will support programs with multiple files. I worried it might only work with a few select Axe programs since a few complex ones use sub-programs.
And nice to hear.
And yeah at first you should make sure as original Axe it works. Just for the future it would be nice if there was a way to support different resolutions, color depths and maybe different default sprite sizes (such as 16x16).
In any case, good luck :D
-
TL;DR.
j/k I would abide you if you added color and size :O
-
Maybe if you extend it also make sure that you tell how large the pixel size is :)
-
Wow, that is really amazing. I can imagine it being really useful for testing Axe programs :o
True. My Pokemon game takes more than one minute to compile, and when testing, I can lose half an hour of coding just with this.
Awesome tool :D
-
Maybe if you extend it also make sure that you tell how large the pixel size is :)
Do you mean resolution? ???
But yeah if this was extended for non-calc programming, the essential stuff that would have to be added is 16x16 Pt-On mode, 8, 16 or 24 bit color mode (preferably 8 for size reason) and custom resolutions, to allow at least SNES-like game making.
-
I finally got some more program working. :w00t:
-
Someone wondered if this (http://jacob.heliohost.org/calc/axe/emulator/cube.html) was possible, and I was curious, so I tried it. :D Unfortunately, I don't think I will be able to this to an arbitrary program for a while.
-
It is totally epic! :D
Now just make it run TheQuest :P
-
You should consider having the axe stuff in a dll so that the code is smaller.
-
Glad this is still progressing Jacobly. Hopefully it gets more updates soon. :)
You should consider having the axe stuff in a dll so that the code is smaller.
Due to compression or something?
-
Because it would be like axe fusion: all of the commands are stored in a library elsewhere, and whenever a program needs these commands it just uses the ones in the dll.
-
This is pretty awesome stuff. If you do eventually decide to add additional functionality as some have suggested in this thread, I think I'd make it a separate project( IE have one emulator that is 100% compatible with the calc rendition of axe and a separate one with added functionality).
-
This is pretty awesome stuff. If you do eventually decide to add additional functionality as some have suggested in this thread, I think I'd make it a separate project( IE have one emulator that is 100% compatible with the calc rendition of axe and a separate one with added functionality).
You *could* have both in the same project, it would just be up to the programmer if he wanted to write a calc compatible program :P
Although separate would be useful for having different syntax, token names, etc.
-
ME WANT, to +1 you!
-
Windows:
- Download Axe.exe (http://ubuntuone.com/02gNPKGjtfKrRC3jePZ2k0) and pthreadGC2.dll (http://ubuntuone.com/5eRqljMg1BSfPSQHIc9XCG).
- Make sure that the dll is either in the same folder as Axe.exe, or on the path.
- Just drag-and-drop an .8xp Axe source file on Axe.exe.
Linux:
- Download Axe (64-bit (http://ubuntuone.com/6gzpcx0EKNJ2dUrbD8H3YO), 32-bit (http://ubuntuone.com/4Up1tEldChk5IAmzDaB0Tu), Old 64-bit (http://ubuntuone.com/4vVhBdAxZ0v75djAKS2xXH), Old 32-bit (http://ubuntuone.com/246NR0kTEkeQtFoXr4yZJH)).
- Open terminal.
- $ cd <path to executable>
- $ chmod +x Axe
- $ ./Axe <Axe source file>
Edit: Added more linux versions (Use the old versions if you get GLIBC version errors).
-
Axe.exe doesn't work for me ??? I also tried running it as Axe.exe SRC.8xp from the command line, and that didn't work either.
By the way, any plans to make it support programs with multiple source files, like as a ZIP? That would be awesome because I haven't made any programs in a single file in the past year and a half ;D
EDIT: I'm on Windows Vista 32-bit, if that helps. The old .exe files worked for me.
-
Are you using the right version?
-
There's only one for Windows.
-
If nothing happens, it probably means that the program uses something that isn't supported yet (like files, for example). And yes, multiple source files are supported, but they must be in the same folder, and for now, named like PROGNAME.8xp.
Also, you can always send me the source code, and I can try to implement what is necessary to make it work.
Edit: I haven't tried it on Vista, so you might want to make sure that one of the examples that comes with Axe works.
-
Oh, sorry, I was looking at Linux. Is pthreadGC2.dll on the same directory or on the path?
-
If nothing happens, it probably means that the program uses something that isn't supported yet (like files, for example).
Oh, that might be it. My games tend to look for themselves at the very beginning, which explains why they didn't even show up.And yes, multiple source files are supported, but they must be in the same folder, and for now, named like PROGNAME.8xp.
Oh great, that's a relief :)Edit: I haven't tried it on Vista, so you might want to make sure that one of the examples that comes with Axe works.
I tested it with the Axe examples and they work, but they run really fast O.O In any case, awesome work!
-
I tried this version and it worked quite fine for me it seems, at least for the few files I tried. Indeed it ran fast, though. O.O
By the way is the key map the same as WabbitEmu?
-
jacobly explained on IRC that it quits immediately if it finds any unimplemented features, like files or #Realloc, and that was why none of my programs worked (I tend to use #Realloc a lot).
The keymap seems to be the same as WabbitEmu, which means [wikiti]Emulators:PindurTI#Basics[/wikiti].
-
Update: Axe Emulator now properly emulates memory.
Windows:
- Download Axe.exe (http://ubuntuone.com/1814q5UyeGLZEEU2V7yamj) and pthreadGC2.dll (http://ubuntuone.com/3Z9HKr9pkGqS8T95YFYdS4).
- Make sure that the dll is either in the same folder as Axe.exe, or on the path.
- Just drag-and-drop an .8xp Axe source file on Axe.exe.
Linux:
- Download Axe (64-bit (http://ubuntuone.com/6gzpcx0EKNJ2dUrbD8H3YO), 32-bit (http://ubuntuone.com/4Up1tEldChk5IAmzDaB0Tu), Old 64-bit (http://ubuntuone.com/4vVhBdAxZ0v75djAKS2xXH), Old 32-bit (http://ubuntuone.com/66Ss58Ah50zNjosDRFyj5U)).
- Open terminal.
- $ cd <path to executable>
- $ chmod +x Axe
- $ ./Axe <Axe source file>
(Use the old versions if you get GLIBC version errors)
-
Did you have a JavaScript version of this somewhere? For some reason I remember using it in my browser at some point. But I might have gotten it confused with the other emulators.
EDIT: Darn, still doesn't work with the stuff I'm trying :(
-
Did you have a JavaScript version of this somewhere? For some reason I remember using it in my browser at some point. But I might have gotten it confused with the other emulators.
I have wanted to do this for a while, but the programs produced by Axe Emulator were meant to run continuously, and browsers don't like javascript code that doesn't return. I had a proof of concept showing that it was theoretically possible here (http://jacob.heliohost.org/calc/axe/emulator/cube.html), but it wasn't feasible at the time because I had to modify the javascript by hand in order to make it work.
After rewriting the parser in Axe Emulator, I was able to change the behavior of the produced programs to run in stages instead of continuously. This means that I am now able to compile Axe source code to working javascript in an easily automated fashion. Some examples of this can be seen at http://axe.jacob.heliohost.org/ (http://axe.jacob.heliohost.org/). Hopefully, I will be able to finish both the parser rewrite and the javascript port of the Axe routines soon, so that I can release an update.
-
HelioHost isn't loading right now, but I've seen it so I'll say it's just awesome :D
EDIT: Where's 2nd mapped to?
-
shift
and this really is pretty cool; it's running choppily for me, though.
-
Do you have a list of supported commands? So far, none of my programs have worked...
-
By the way, is the z80 emulator you mentioned on IRC built over this?
Also if possible, would it be possible to switch from Heliohost? Their uptime (and speed) sucks horribly. :/
-
***BUG REPORT***
There is a problem with the emulator on your website, numbers can't go over 255. This makes quite some programs go haywire.
-
I don't care if this is technically a necropost, this needs to be bumped. It's a pretty awesome tool that Axe developers should know about and I'd love to see it improved even more.
-
Sadly, I think Jacobly is pretty much done with calc stuff, as he only posted like 5 times in half a year and last logged in in early August. D:
Maybe there needs to be an updated list of useful Axe programs, stickied in the Axe section.
-
I can try to make a kind of axe interpreter in Lua... no promises though because usually my projects die early D:
-
axe intepreter in lua should be AWESOME :D
-
An computer Axe Interpreter would just be awesome!
-
An computer Axe Interpreter would just be awesome!
didn't jacobly start on one?
EDIT: I fail, i didn't really check the topic >.<
-
An computer Axe Interpreter would just be awesome!
didn't jacobly start on one?
/me looks at the topic we're in
Although I think this isn't an interpreter, I believe it compiles Axe straight into x86 assembly. The latest version is here (http://ourl.ca/15884/301624).
-
I refrained from commenting. :P
Do we mean the same thing when we say interpreter and emulator, or no?
-
I guess we mean the same thing ^.^