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 ... 34 35 [36] 37 38 ... 135
526
Axe / Re: What am I doing wrong here?
« on: February 26, 2011, 12:09:10 am »
List elements are floats not nibble.  You read them with float{<pointer>} to get their numeric value if they are integers between 0 and 65536.  Otherwise, you would have to parse them some other way.

527
Axe / Re: What am I doing wrong here?
« on: February 24, 2011, 04:39:15 pm »
Hmm... this is a bug then.  The L token is supposed to translate to [015D]... I will fix this next version.

528
TI Z80 / Re: Zelda News
« on: February 18, 2011, 04:25:19 pm »
The run indicator is still on which means you have interrupts enabled.  For the smooth grayscale you should always turn off interrupts with "fnOff".

529
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: February 16, 2011, 11:32:36 pm »
@squidgetx
I don't think pixel testing points with constant coordinates is common enough to warrant the pixel tester to treat it as a special case.  99% of the time, you're going to be using variable arguments to test pixels.  If not, the code can probably be made more efficient without a pixel test in the first place.

The second paragraph is my suggested optimization. The 3-level grayscale routine doesn't have a throttling system, yet there have been no reports of display problems from anybody. Wouldn't this suggest that all the screen drivers can handle routines that have as much delay as this? The data copying loop in the 3-level grayscale routine takes 72 cycles per byte output, so could delays simply be added to the normal screen display routine to make its loop at least 72 cycles?

Unfortunately that is not entirely true.  There has actually been at least 1 report that the 3-level routine is too fast and causes flickers once in a great while on very new hardware.  If there was a lower bound for clock cycles, I'm right on it.  Although, I could still probably take the safety stuff off the safe copy routine, still have it faster (but not too fast) and still be smaller.  I will look into that.

And I do read most of these threads, I'm just generally too busy to post, but I try to when I have small pockets of free time :)

530
The Axe Parser Project / Re: MIDI To Axe Music Converter
« on: February 16, 2011, 11:21:01 pm »
I'm planning on packaging this with Axe under "Tools" in the future once I clean up the program.  Since I know Qt now, I was thinking of giving it an actual GUI.

531
The Axe Parser Project / Re: Memkit issues
« on: February 13, 2011, 03:20:18 am »
Those tokens are not specific to MemKit, they are for any Axiom to use which is why there are so many (with more coming).

I found the source of the bug; 1 bit needed to be changed in the Axiom engine because it was assuming that routines with arguments and r modifiers had to be inline, fixed it now, I'll make sure to update soon with the patch.

532
The Axe Parser Project / Re: Bug Reports
« on: February 12, 2011, 08:10:01 pm »
Fixed it, that was a really really stupid mistake, something I added in last minute that I didn't have time to test.  I'll get the typo later.  Sorry about that.

533
The Axe Parser Project / Re: Axe Parser
« on: February 12, 2011, 07:54:10 pm »
So double post I guess:

The next beta has arrived!  :) In case you were wondering, the new axiom is called "MemKit" can can be found in the "Tools" section of the zip file.   The developer information for developing your own axiom is in the "Developers" section.  Since the Axioms are new I expect bugs, so please report them if you feel that something is not working the way it should.  Haven't found any yet though.

Edit: Actually I did hehehe....

534
The Axe Parser Project / Re: Latest Updates (***DO NOT POST HERE!***)
« on: February 12, 2011, 07:45:37 pm »
Axe Parser
Epsilon 0.5.0


Sorry about the super slow pace of updates...

New Features:
  • Axioms finally fully functional!
  • Example axiom included.
  • "While 1" and "Repeat 0" automatically optimize to "Do" loops.
  • New "EndIf" and "End!If" statements for post-testing in loops.
  • Help menu actually shows something now!

Changed:
  • Fixed sprite rotation commands.
  • Fixed nibble reading commands.

535
The Axe Parser Project / Re: Axe Parser
« on: February 12, 2011, 02:58:26 pm »
Code: [Select]
If A=1
    .Do something
End
If A=2
    .Do something
End
...
If A=(some_number)
    .Do something
End

This can be shortened to
Code: [Select]
If A=1
    .Do something
ElseIf A=2
    .Do something
ElseIf ...(etc.)
    .Do something
ElseIf A=(some_number)
    .Do something
End

Just to clarify, this would not shorten the code, but actually make it larger since they work in 2 different ways.  The elseif is actually the same as this:
Code: [Select]
If A=1
    .Do something
    Goto E
End
If A=2
    .Do something
    Goto E
End
...
If A=(some_number)
    .Do something
End
Lbl E

So you should ONLY use elseif's if you need to enforce that exactly one of the statements will execute.  In your example, the regular if statements are smaller because you're already guaranteed that A can only hold a single number.  However, its true that the elseif is faster since it only needs to check conditionals until it finds the true one instead of checking all of them.

536
The Axe Parser Project / Re: ERR:?
« on: February 10, 2011, 05:27:05 am »
Yeah I would guess its something corrupted in the symbol table.  If you haven't already, I would recommend a data backup and ram clear and see if that works.  If you happened to archive anything while the symbol table was corrupted, it could have resulted in the archive's entry also getting corrupted in which case you would have to do a full rom clear.

537
News / Re: Axe Parser's 1st anniversary
« on: February 08, 2011, 12:58:56 pm »
Thanks everyone!  I have the next update ready, I just need to do more testing with the new axiom (called "MemKit") and then update all the documentation stuff.  I have been trying to get it out, Its just that I've been literally non-stop busy with school.  I think I'll have a break Thursday though, so I'll have a chance to release it then.

538
Axe / Re: The Optimization Compilation
« on: February 06, 2011, 09:09:55 pm »
Its not an auto-optimization, but it is a significant one.

To have a loop with a conditional at the end saves 3 bytes from a loop with conditional checking at the beginning. For instance:
Code: [Select]
Repeat getKey(15)
...code...
End

Can become:
Code: [Select]
While 1
...code...
EndIf getKey(15)

You can't do this with every loop since a lot of them need to check before entering the loop, but with situations like this example, it probobly doesn't matter.  The EndIf can actually be used on any loop structure though, including do loops, while loops, repeat loops, and for loops.  A do loop, which is also new, is just a "While 1" or "Repeat 0" which automatically get optimized to not do the check at all since they always loop.

539
Axe / Re: The Optimization Compilation
« on: February 06, 2011, 05:57:55 am »
That's going be a thing of the past.  That optimization is built into Axe now. ;)

540
The Axe Parser Project / Re: Features Wishlist
« on: February 03, 2011, 01:48:14 pm »
That would use the symbol table which is already limited by 153 entries for labels and static pointers.  If I add named constants, those would have to share that same space and also be limited to 3 characters long.  It would be nice though, I'll think about it.

By the way, a lot of people mentioned switch statements.  I tried before but I couldn't get much optimization.  But just now I remembered a better method for switch statements that was right under my nose the entire time: the same strategy I use already in the parser!  Each check would only take 4 bytes plus 8 bytes for initialization.  The format would be like this:

A->Switch(0,ZER,1,ONE,10,TEN,1000,THO)

Which checks A.  If A is 0 it jumps to ZER, if its 1, it jumps to ONE, etc.  And if its none of them, it continues.  This allows me to create a vector jump table for super space efficiency.  But, there is quite a lot of overhead, so this would be really only useful if you use it a lot.

Code: [Select]
ld   hl,(axv_A)
 ld   de,JT1
 ld   a,4
call JumpTable

JT1:
.dw 0,ZER
.dw 5,FIV
.dw 10,TEN
.dw 1000,THO

JumpTable:
 ld   b,h
 ld   c,l
 ex   de,hl
loop:
 ld   e,(hl)
 inc  hl
 ld   d,(hl)
 inc  hl
 ex   de,hl
 or   a
 sbc  hl,bc
 ex   de,hl
 ld   e,(hl)
 inc  hl
 ld   d,(hl)
 jr   z,done
 inc  hl
 dec  a
 jr   nz,loop
 ret
done:
 pop  hl
 ex   de,hl
 jp   (hl)

Pages: 1 ... 34 35 [36] 37 38 ... 135