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 - Quigibo

Pages: 1 ... 106 107 [108] 109 110 ... 135
1606
ASM / Re: ASM Optimized routines
« on: April 29, 2010, 05:59:58 pm »
Quigibo's Challenge!

Can any of the following be done in 6 or fewer bytes?  The input and output must be HL.

  • Multiply by 128?
  • Signed division by any nontrivial constant, other than 2, including negative numbers?
  • Modulus with any constant that is not a power of 2?

I'm rewriting my math engine almost from scratch so I decided I would just optimize everything I could possibly conceive of at the same time.  These are the ones I'm having trouble finding.

1607
The Axe Parser Project / Re: The Axe Pages
« on: April 28, 2010, 10:55:57 pm »
Thanks!  Fixed.

1608
Axe / Re: DispGraph(r) and greyscale?
« on: April 28, 2010, 10:40:56 pm »
Yeah, this one stays.  What the new grayscale commands will do is mainly for sprite and pixel routines.  Those routines will draw to one or both buffers at the same time so you can have grayscale sprites/draw grayscale pixels.

1609
The Axe Parser Project / Re: The Axe Pages
« on: April 28, 2010, 06:07:13 pm »
Its not just enabling and disabling the [ON] interrupt, you also have to set up a vector table in RAM for the interrupt as well as some code to handle the interrupt.  Not only that, but I also have to save the state of the stack and then restore it when the interrupt is called otherwise, it will never break out of the code when you're in a subroutine.  I'm sure it wold be at least 100 bytes and in addition it would have to use about 300 bytes of free ram that would no longer be available for the programmer.

1610
The Axe Parser Project / Re: The Axe Pages
« on: April 28, 2010, 02:00:09 pm »
Unfortunately, assembly doesn't allow you this option without some special interrupt code.  I may be adding a safety feature eventually that allows you to test in a "debug mode" which adds the interrupt code to the source to allow [ON] breaks.  Even though it makes the executable larger and slower, it would really just be for testing anyway.

I'm not sure how the NSpire handles 84+ emulation, but I've heard its not the greatest when it comes to things like this.

1611
Web Programming and Design / Re: Javascript Catch the Dot Game
« on: April 27, 2010, 11:26:20 pm »
You have to click on what I first thought was an ad to start the game.  You don't click the dot like the title says, but just hovering over it is enough to win.  Its mildly amusing, although I have to admit, its way too easy on my tablet compared to using the mouse. :)

1612
The Axe Parser Project / Re: Bug Reports
« on: April 27, 2010, 11:19:08 pm »
Just noticed that the signed routines are not working for any command where the unsigned version is auto-optimized.  Right now, its only //2, //128 and //256 I think.  I forgot that they need slightly different auto-optimizations.  Just wanted to report that in case anyone is having problems with this.

1613
TI Z80 / Re: Tunnel clone, with a little twist *runs*
« on: April 27, 2010, 01:05:32 pm »
I did a few optimizations for you, hopefully you'll understand them and catch on.  Most of the other optimizations you can do are with the program flow rather than actually optimizing your code.  For instance, you only use one division routine in the entire code, but you can replace it with a multiplication (High S value corresponds to low speed) instead to avoid needing the routine at all which can saves like 20 bytes or something.

Quote from: BASIC Code
:.DJTUNNEL Axe Parser Tunnel clone
:[80C0E0F0E0C08000→Pic1
:[FFFFFFFFFFFFFFFF→Pic2
:"SCORE:"→Str1
:"AXE TUNNEL"→Str2
:"2010, BY DJ OMNIMAGA"→Str3
:"SPEED:"→Str4
:0→D→P+1→S+1→Q
:8→C+1→R
:30→A
:10→W→T

:Full
:DiagnosticOff
:ClrHome
:ClrDraw
:For(Z,9,21
:Line(0,Z,95,Z
:End
:Line(0,56,95,56
:StorePic
:ClrDraw
:For(Z,8,22
:Line(0,Z,95,Z
:End
:For(Z,56,63
:Line(0,Z,95,Z
:End
:DrawInv
:Fix 5
:Fix 1
:Text(20,12,Str2
:Fix 0
:Text(14,57,Str3
:Fix 3
:Text(5,35,Str4
:29→I
:5→J
:2→K
:Repeat Z=54
:DS<(K,12)
:DispGraphr
:End
:DS<(J,9/S)
:Pt-Change(I,34,Pic1)
:I+1→I
:If I=86
:29→I
:End
:End
:getKey→Z
:Z=3-(Z=2)+S→S
:If S=6
:5→S
:End
:!If S
:1→S
:End
:End
:ClrHome
:ClrDraw
:For(Z,10,50
:Line(0,Z,95,Z)
:End
:Repeat W=6 or getKey(15)
:P+S→P
:DS<(C,8)
:rand^2*2-1→D
:End
:R+D→R
:!If R
:1→R
:End
:If 62-W<R
:62-W→R
:End
:If getKey(4)
:A-1→A
:End
:If getKey(1)
:A+1→A
:End
:Pt-Change(0,A,Pic1)
:Line(95,R,95,R+W)
:DS<(Q,S)
:DispGraph
:If pxl-Test(0,A) or pxl-Test(0,A+6)
:Goto GO
:End
:End
:Pt-Change(0,A,Pic1)
:Horizontal-
:DS<(T,99)
:W-1→W
:End
:End
:Lbl GO
:Fix 4
:Fix 2
:ClrHome
:Output(0,0,Str1,P►Dec
Generated by SourceCoder, © 2005 Cemetech

Edit:
the executable would be about twice smaller than the executable.
lolwut?
In source code, sprites are stored in hex form. A 8x8 sprite takes 16 bytes in the source. When compiled, that sprite shrinks to 8 bytes. Same for any hex data. Say you have a game with 20 KB of map data and 0.5 KB of code. The maps will end up 10 KB and the code around 1 KB
It was funny becasue you said executable was smaller than itself.  You meant the source would be about twice smaller than the executable size.  ;)

1614
TI Z80 / Re: Tunnel clone, with a little twist *runs*
« on: April 27, 2010, 03:26:00 am »
Wow!  That's actually really impressive!  And the menu is really cool too.  I especially like how you used grayscale and the speed animation looks really nice.  And of course I get rickrolled in the process  :P

1615
Axe / Re: A little help
« on: April 27, 2010, 01:01:11 am »
Yeah, when I add >Dec support for Text() I will also add the >Frac.

Temporarily, you can use the Output() feature to do this but it has to be aligned.

1616
The Axe Parser Project / Re: Bug Reports
« on: April 27, 2010, 12:53:24 am »
I think you're just missing the parenthesis.  You need them for logic operators, at least on all the arguments after the first one.

Z=54 or (Z=15)

Edit: Ninja'd!  Unrelated: Why isn't there a delete post button?  I usually see them on other boards if your post is the last one in a topic.

1617
Axe / Re: A little help
« on: April 27, 2010, 12:50:31 am »
That's coming next version for sure.  There isn't a built in OS-call to display an integer in an arbitrary position (that I know of) so I have to do a little work around by converting it to a float and then displaying it.  Its slower, but its somewhat small.

1618
The Axe Parser Project / Re: The Axe Pages
« on: April 26, 2010, 11:54:29 pm »
No, its not there yet.  I completely forgot about it.  Maybe next version, I'll add it to the list.

1619
The Axe Parser Project / Re: Features Wishlist
« on: April 26, 2010, 11:47:37 pm »
Binary support means all of the above.  Individual bit operations as well as a new number representation.

The only problem with tile mapping though is that you have to add the entire picture even if you only add a couple tiles.  Also what do I do about the last row of tiles?  Since pic vars are only 96x63, do I just assume the bottom bits are all zeros or do I ignore that whole row of sprites?

Random seed generation is not possible like basic becasue the random numbers have a real randomness factor to them that prevents any predictability with a given seed.

1620
The Axe Parser Project / Re: Latest Updates (***DO NOT POST HERE!***)
« on: April 26, 2010, 11:13:13 pm »
Axe Parser
Beta 0.2.1b (fixed)


Sorry guys, my mistake.  Here is the real 0.2.1

Pages: 1 ... 106 107 [108] 109 110 ... 135