Author Topic: Axe Interpreter  (Read 24258 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Interpreter
« Reply #30 on: December 21, 2011, 06:26:34 pm »
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
^ That.

Note: Later today, I'll upload another version.  GetKey has been implemented, along with pointers, so you can have legit lists.
I'm having some trouble integrating the screen with manipulating memory, so writing to L3 or L6 won't currently effect the screen.

Does anybody know how you can use a bytearray or a list (in python) to manipulate or create a pygame Surface?
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Interpreter
« Reply #31 on: December 21, 2011, 06:34:54 pm »
How will getKey work with computer keys? :P

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Interpreter
« Reply #32 on: December 21, 2011, 06:41:05 pm »
You have a config file, and you assign whatever computer key you want the appropriate computer key.  So to make GetKey(15) equal the backspace key, you would edit the config file so the appropriate line reads

Code: [Select]
K_BACKSPACE    :   15
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: Axe Interpreter
« Reply #33 on: December 21, 2011, 07:32:41 pm »
Does anybody know how you can use a bytearray or a list (in python) to manipulate or create a pygame Surface?
Take a look at these two classes (is that the right term?):
http://pygame.org/docs/ref/pixelarray.html
http://pygame.org/docs/ref/surfarray.html

It should do what you want it to do. :) Note that surfarray requires numpy/numeric, so keep that in mind when you're using it. (It's standard, but it may or may not increase built exec size.)
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Interpreter
« Reply #34 on: December 23, 2011, 02:55:59 am »
Another release!

getKeys, scrolling, a few more pxl-commands, rudimentary pointers and constants (using L1-L6 for lists, mostly), a bunch of math commands, and a few more control structures were added.

Download here: http://dl.dropbox.com/u/10645749/axe-interpreter_v0.2.zip
Executables for Linux and Windows along with source code should be included.  (Tested on Windows 7 (64 bit) and Linux Mint 11 (32 bit))

I then whipped up a quick tunnel game below, which you can watch below ;D



(Hmm, the embedded youtube video is a bit too small.  Is there a way to make them bigger?)
(Edit: Weird, you can't see the mouse.)

Additional notes:
By default, a few keys are mapped to getKey -- for example, pressing backspace maps to 'getKey(15)', for example.  Included in the folder should be a file named 'keybindings.config' which can be edited to change which keys maps to which getkey.  That file has to be in the same folder as the exe.

You can use the '{ }' brackets and L1-L6 for lists and pointer stuff, but currently changing L6 or L3 doesn't change the buffers yet.

Using @OPEN "filename" (you have to include the quotation marks) can open files directly inside the interpreter.  If you use those commands inside files, I guess that would work as a sort of substitute for imports/subroutines, at least until I have legitimate imports, subroutines, labels, etc. working.
« Last Edit: December 23, 2011, 03:00:53 am by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Axe Interpreter
« Reply #35 on: December 23, 2011, 03:03:27 am »
wow, great.. looks like this is going to have full axe support.. wonderful

i'm going to map some keys right now :)
« Last Edit: December 23, 2011, 03:04:22 am by Nick »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Interpreter
« Reply #36 on: December 23, 2011, 12:36:05 pm »
This just looks sooooooooooooo cool! :)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Interpreter
« Reply #37 on: December 23, 2011, 01:45:54 pm »
Maybe one of the included keymap config files could be just like Wabbit's default. It's alright, but could be better IMHO.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Interpreter
« Reply #38 on: December 23, 2011, 04:04:25 pm »
Maybe one of the included keymap config files could be just like Wabbit's default. It's alright, but could be better IMHO.

Do you know where I can find an official copy of what Wabbitemu uses for key mappings?  This should be pretty trivial to change. 
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: Axe Interpreter
« Reply #39 on: December 24, 2011, 09:26:44 am »
Maybe one of the included keymap config files could be just like Wabbit's default. It's alright, but could be better IMHO.

Do you know where I can find an official copy of what Wabbitemu uses for key mappings?  This should be pretty trivial to change. 
There are two ways:
1) Look in hardware/keys.c and look for the corresponding key bindings set up (all in C);
2) Look at http://wikiti.brandonw.net/index.php?title=Emulators:Wabbitemu (all in plain English) ;)

Note that the keys used in hardware/keys.c don't match up with the SDL keys, so don't use it verbatim!

EDIT: Also, I don't think a "keymap config file" exists for Wabbitemu.... unless you're talking about those keymap images, which isn't exactly something you would want to play with unless you wish to implement ports. (Some possible outdated (if at all possible) skins here (file *keymap): http://code.google.com/p/wxwabbitemu/source/browse/#svn%2Ftrunk%2Fsrc%2Fgui%2Fskins)
« Last Edit: December 24, 2011, 09:29:44 am by alberthrocks »
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Interpreter
« Reply #40 on: December 24, 2011, 10:55:42 am »
So what does this actually do? is this meant to test axe programs on pc without a lot emulator hassles?
I'm not a nerd but I pretend:

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: Axe Interpreter
« Reply #41 on: December 24, 2011, 11:02:05 am »
So what does this actually do? is this meant to test axe programs on pc without a lot emulator hassles?
Looks like a port of Axe to computer to me. If it is, maybe color commands should be added.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Interpreter
« Reply #42 on: December 24, 2011, 11:31:04 am »
Should this be working?



Edit: I got the file to open by moving it to the Windows folder.
Also how do you make .axe files?
« Last Edit: December 24, 2011, 11:39:11 am by epic7 »

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Interpreter
« Reply #43 on: December 24, 2011, 07:11:28 pm »
Currently, strings aren't supported.

A .axe  file is the same as a .txt file.  You can use either -- the extension doesn't matter.

So what does this actually do? is this meant to test axe programs on pc without a lot emulator hassles?

^ That.  It could also eventually let you port your Axe games to be playable on the computer.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Interpreter
« Reply #44 on: December 25, 2011, 11:52:01 pm »
Is the syntax exactly the same? If so, then I guess once complete we will be able to play Axe games without any modifications, right? If so, then it would be nice if we could actually import 8xp files (source) or even launch them with the interpreter to play them directly there.