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 ... 7 8 [9] 10 11 ... 135
121
Axe / Re: Online Axe command index
« on: December 14, 2011, 02:19:58 pm »
You can tilemap with the Bitmap command, but its a memory hog unless the map is so detailed that it can't be split into tiles of any size.  The bitmap command supports sprites up to 160x192.  So for instance, you could have a 120x120 bit tilemap stored as a bitmap and saved to a pointer.  (This is already 120*120/8 = 1800 bytes by the way!).

The upper left corner is 0,0 so if you want to draw your tilemap some distance dx to the right and dy down, just use Bitmap(-dx,-dy,Pic1).  In other words, you need to store the negative offsets of your tilemap somewhere, lets say X = -dx and Y = -dy.  Edge detection is as simple as X >=>= 0 for left, X + 24 << 0 for right, Y >=>= 0 for top, and Y + 56 << 0 for the bottom.

122
The Axe Parser Project / Re: Bug Reports
« on: December 14, 2011, 06:01:57 am »
 :crazy: I fixed the error scrolling!!! :crazy:

The trick was to learn how those stupid edit buffers actually work.  In case anyone is interested, I will explain the problem because you never know who will need it.  Basically the edit buffer moves all programs other than the one you are editing to the end (or beginning?) of RAM so that the buffer you have to work with is consecutively: All of free ram followed by the original program.  The original program is then copied to the start of the free ram (so now there are 2 copies).

Here is where the error comes in.  What happens when the program you're editing takes up more than the available ram in your calculator? (e.g. editing an 8Kb program when you only have 4Kb of ram left).  You obviously don't have room for 2 copies, so one of them has to get cut.  The way I was shifting the edit buffers originally, I was assuming that the original program at the end of free ram would get cut so the copy could be edited.  But instead, the top program was truncated.  So all I had to do was just use the handy ldir (Axe's Copy() command) to copy the original into the editing spot.  From here on, the rest of the code works the way its supposed to now that the buffers are corrected.

This is Axe's longest solution-less bug to be fixed!  The second longest was probably re-enabling interrupts correctly (Solved by our clever calc84maniac)

This also means error scrolling can finally be automatic since it won't ever crash.  No need to press [prgm] anymore, it will always take you to the error unless you press [clear].

123
The Axe Parser Project / Re: Features Wishlist
« on: December 13, 2011, 07:43:13 pm »
Alright, I'm just going to redesign the compiling progress menu in general.  I think I can include 3 or 4 feature requests into that screen by just readjusting the layout.

124
The Axe Parser Project / Re: Bug Reports
« on: December 13, 2011, 07:13:11 pm »
That's not a bug, Axioms must be appvars in order to work.  Axe only allows them as programs for the purpose of converting since most assemblers cannot natively export an appvar.  Axe cannot convert the program for you if it is in archive, so it errors.  The reason I cannot unarchive, convert, and then rearchive is because the entire edit buffer is used during compiling.

125
Axe / Re: Axe Q&A
« on: December 13, 2011, 05:00:38 pm »
Alternatively, its a little easier to define them like Data(24,24)[sprite]->Pic1 instead.  Also, a sprite with width 24 is going to have 24-bits per row (6 hex numbers).  Since the height is 24, it will have 24 sets of these.  That's 6*24 = 144 hex digits.

126
Axe / Re: Routines
« on: December 13, 2011, 03:17:28 am »
I made this fun little program and I wanted to share it because its awesome.  See if you can guess what shape it draws. ;D  
(Requires 1.1.0)

:.COOL
:.Allocate a 96x64 bitmap
:[6040]→Str1
:Buff(768)
:
:.Draw a single pixel on the screen
:ClrDraw
:Pxl-On(0,0)
:
:.Loop a few times
:1→C
:For(6)
:  .Turn the buffer into a bitmap
:  Copy(L6,Str1+2,768)
:
:  .Draw some bitmaps
:  Bitmap(C,0,Str1)
:  Bitmap(0,C,Str1)
:  
:  .Display and iterate
:  DispGraph
:  C*2→C
:End
:Pause 5000

127
TI Z80 / Re: Seeker
« on: December 13, 2011, 02:42:06 am »
By the way, any bits that are in the bitmap data that are NOT displayed (the right edges for sprites with widths that are not multiples of 8 ) must be set to zero.  It might be possible to corrupt memory or see sprite glitches without this.

128
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: December 13, 2011, 02:07:20 am »
The disassembly looks fine to me.  All the jumps calls and everything of that nature are aligned.  I tried 4 test cases with different combinations of sign values and they seemed okay.  Since the generated picture is relatively close to the original given that it was a chaotic system sensitive to errors, I would guess it is only a few special cases that cause it to return a wrong result.

EDIT: I made a program to run them side by side on random numbers and quit when the output is different.  Here is an output that gives different results between the routines:

$FFE0 ** $F5F1 (-0.125 ** -10.059)

Results in $0143 (1.26) in size optimized.
Results in $0239 (2.22) in speed optimized.

129
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: December 13, 2011, 01:19:54 am »
Wow thanks!  However there seems to be an issue.  The 3 pictures attached are the output from the Mandelbrot Set demo program. The first is the original routine.  The second is your new size optimized version.  As you can see it works, but the rounding appears to be asymmetrical (which might still be okay).  The last one is your speed optimized version.  I think you have a bug somewhere...  :P

130
The Axe Parser Project / Re: Features Wishlist
« on: December 12, 2011, 10:44:45 pm »
I can do that... but then the percentage will just stand still every time it parses a subprogram which might appear like freezing.  I don't know if that would be considered better or worse.  I could at the same time display the percentage of the subprogram elsewhere at this moment.  I'll see how it looks.

131
The Axe Parser Project / Re: Features Wishlist
« on: December 12, 2011, 10:32:40 pm »
It will know the executable size after pass 1, but it won't know the total size including the data until after pass 2.

EDIT: Maybe make a "statistics" option then?  Display executable size, native subroutine size, data size, total size, amount saved by peephole optimization, etc. when it finishes.

132
The Axe Parser Project / Re: Features Wishlist
« on: December 12, 2011, 10:28:03 pm »
I still think just using another token would be easier... it is more flexible since you don't have to use it on the same line, easier to parse, and I personally think it is easier to use and understand since it is easy to confuse exactly what the syntax is supposed to do as Builderboy has already done.  Also, by using another token, I don't mean redefining an existing one, I mean just using one of the OS tokens with its original name.  I was thinking maybe "Seq" from the mode menu?

@Happybobjr
The problem is that it won't know the size until it finishes the entire compile.  If I make it pause the size at the end, it will annoy many users who want to compile as quickly as possible.  But I just had a great idea as I was typing this.  What if I use the homescreen to display the final size of the program?  Axe clears the homescreen anyway when it quits, it might as well do something useful with it.  I like that, I think I'll add that feature.  By the way, the size displayed will not be the same as what you see in the memory management menu because it will not include the symbol table entry.

133
Miscellaneous / Bitman Begins
« on: December 12, 2011, 04:47:21 am »
Here's a video I made for my electrical engineering/computer science honor society.  A few of the jokes are sort of inside jokes for certain Berkeley classes, but most of them are going to be funny for all you programmers.  Enjoy!  ;D

Bitman Begins

Btw, I'm in the video too, the one who gets his code deleted in the beginning.  :P

134
The Axe Parser Project / Re: Features Wishlist
« on: December 12, 2011, 04:36:22 am »
Alternatively, I could add access to Axe's temporary buffer through some new token and store it there.  The temporary buffer is an 8 byte buffer used in a few commands that create more data than can fit in an Axe variable such as Pt-Get() and RotC().  All commands so far that use this buffer also return it so it's location hasn't needed to be directly accessed yet.

135
The Axe Parser Project / Re: Features Wishlist
« on: December 12, 2011, 03:25:35 am »
I am going to suggest a very simple change to one of the least used commands to make it more useful.

Problem:
I suspect very few people are using *^ which returns the upper 16 bits of an unsigned multiplication.  The regular * just returns the lower 16 bits.  Actually, the * command computes both of these quantities at the same time but only returns one of them.  So if you have to get the upper and the lower bits of a multiplication, you end up calling the same multiplication twice!

Solution:
I propose that in addition to *^ returning the high bits, it also stores the low bits in another location, for instance r6.  Even more ideally, I feel like it should do the opposite:  return the low bits (identical to regular multiplication) store the high bits to r6.

Issues:
r6 seems like the best option, but no matter what location I pick it could lead to incompatibility.  If I make it return the low bits and store the high bits this will definitely lead to an incompatibility, but optimizes better and is more useful I think.


Consensus?  Especially if you use or ever have used this operation.

Pages: 1 ... 7 8 [9] 10 11 ... 135