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 ... 61 62 [63] 64 65 ... 135
931
The Axe Parser Project / Re: Bug Reports
« on: August 10, 2010, 05:30:46 pm »
Thank you for finding the problem!  Yeah, the interrupt command functions differently than the labels.  I didn't think to look at that, but now I know where it is, thanks.

932
The Axe Parser Project / Re: Latest Updates (***DO NOT POST HERE!***)
« on: August 10, 2010, 06:58:27 am »
Axe Parser
Delta 0.4.3



Another follow-up update.  Has some interesting new features too.

New Features:
  • Screen-shift the back buffer in any direction.
  • Bit checking for 16-bit numbers.
  • New auto-opts for bit checking.
  • Missing label displayed when receiving a missing label error.

Changed:
  • Fixed bug that was randomly crashing the parser.
  • Fixed end of file bug with external program names.
  • Parser always resets the window top to the correct position.

933
The Axe Parser Project / Re: Axe Parser
« on: August 10, 2010, 04:15:15 am »
Mainly that you get the whole 16KB space for execution instead of the roughly 8KB execution limit with regular programs.  It also allows you to allocate much more ram since the program itself is not running from the ram.  There is a possibility of allowing apps to be 2 pages in the future with a second page of data only, but I don't know how feasible that is so I can't say for sure.  There are disadvantages though, so unless memory is an issue, I would just stick with programs.

934
ASM / Re: Any trick to make sprites move faster?
« on: August 10, 2010, 02:58:54 am »
The first thing that stands out at me is that you are using _GrBufCpy which is a very slow routine. You can use a custom one to increase the speed a lot and use the wasted clock cycles of that routine to clear the buffer as it draws to the screen so then you only need the 20 sprites total and no clearing at all since its done automatically.  You can find one of those routines here.

EDIT: Actually, it looks like you're double buffering instead of clearing the screen.  You can do that too with a few modifications.

935
The Axe Parser Project / Re: Bug Reports
« on: August 10, 2010, 02:44:51 am »
@Runer, most of those bugs have been fixed in 0.4.3 already.

@Builderboy, that's no bug!  Apps need about 120 extra bytes for the header, about 67 bytes for the dummy signature, and they have larger routines for displaying text.

936
The Axe Parser Project / Re: Bug Reports
« on: August 09, 2010, 09:55:29 pm »
I don't use them, but I like to keep them on anyway (or assume that they are on) just in case any of the bcalls require them to stay on or toggle the interrupt state themselves.

I think I'll update late tonight.  In case anyone has noticed the pattern, updates ending in even numbers are generally less stable because I add the most drastic changes to them and then the odd number updates fix the bugs of the previous versions and then add only easy templated things.

937
The Axe Parser Project / Re: Bug Reports
« on: August 09, 2010, 06:04:09 pm »
Its all related to that same bug.  I still haven't exactly found the source of the error, but I found much more information on it.  It is somehow based on timing because transferring exactly the same program on a fresh emulation and following exactly the same steps yields different errors.  Sometimes it happens on the first compile, sometimes I go through 20 compiles and don't have a problem.  And if there is a problem, it's completely different every time.

So since its timing based, I figure that interrupts are probably enabled somewhere where they're not supposed to be.  My initial though was on a routine that uses page swapping since the interrupt expects certain pages to be in place, but all of those routines properly disabled interrupts.  Just to test it, I removed all interrupt enabling instructions from the entire program except for the menu selection where I need it for the getkey.  Since then I haven't gotten the error, so I am suspecting that I indeed found the source of the problem.

But I still can't pin down the actual location of the bug.  Since it only started happening recently, it must be something I added in 0.4.2 but that still doesn't narrow it down much.  What other routines are dangerous to run with interrupts on other than page swapping?

938
Axe / Re: Project Snake X - help
« on: August 09, 2010, 04:42:25 pm »
Indenting your code can help you find block errors:
Code: [Select]
:.LOGO
:DiagnosticOff
:ClrDraw
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:[0010181C18100000]→Pic3
:0→C
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:StorePic
:DrawInv r
:ClrDraw
:For(A,0,63)
:   Line(0,A,95,63-A)
:   DispGraph
:End
:For(A,0,95)
:   Line(A,0,95-A,63)
:   DispGraph
:End
:1→A→Z
:[FDFDFDFDFFFFFFFF]→Pic2
:While getKey→K=/=15    ;You were missing this line.  Otherwise the "End" is not ending anything.
:   If K=1
:      min(M+8,52)→M
:   End
:   If K=4
:      max(M-8,28)→M
:   End
:   M>N-(M<N)+N→N
:   DS<(A,3
:      Pt-Off(rand^96,A,Pic2)
:   End
:   Z+1→Z
:   Vertical +
:   conj(L6,L1,708)
:   sub(DM)
:   DispGraph
:   conj(L1,L6,708)
:End
:Fix 0
:Fix 4
:
:If M=28
:   sub(SX
:End
:If M=36
:   sub(HP
:End
:If M=44
:   sub(SC
:End
:If M=52
:End
:Return
:Lbl DM
:For(B,0,148)
:   {B*2+Pic1}r→D□65535∙{B*2+L6→C}r┼({B*2+Z}r∙D)→{C}r
:End
:For(B,168,353)
:   {B*2+L3}r∙{B*2+L6→C}r→{C}r
:End
:Pt-On(22,N,Pic3)
:Pt-Change(22,N,Pic3)
:Return
:Lbl SX
:ClrHome
:Disp "A"
:Return
:Lbl HP
:ClrHome
:Disp "B"
:Return
:Lbl SC
:ClrHome
:Disp "C"
:Return
:Lbl EN
:ClrHome
:Disp "D"
:Return

939
Axe / Re: A few simple questions...
« on: August 09, 2010, 12:31:15 pm »
Glad you like it!

1) The first one stores the value 5 into the A variable.  The second one stores a value 5 somewhere in ram at the address A.  You can think of memory as a bunch of boxes, so if A were 1000, you'd be putting a 5 into the 1000th box.  But there are only a few boxes you can use (the free ram) since the operating system uses so many of them.  So don't actually try storing anything to {1000} because that's OS territory.  Overwriting OS stuff is a common cause of ram clears.

2) Real Numbers are stored in the most bizarre format so its extremely hard to read them, I will be adding a converter command eventually.  The first byte is some kind of bit field that also controls the negative sign, the next byte holds the exponent and then the next 7 bytes after that holds the number, but in BCD format (binary coded decimal) so you can't just read it off like a number.

940
The Axe Parser Project / Re: Bug Reports
« on: August 09, 2010, 03:39:59 am »
I think you're confusing user-made subroutines with built-in subroutines.  The user-made subroutines which are basically just labels are just like any other code and added inline whether they're used or not.  But the built-in subroutines like multiplication, Pt-On(), DispGraph, etc. are only added when they're needed, but not inline, they're added at the end of the program like the data to decrease the overall size of the program.

941
The Axe Parser Project / Re: Axe Parser
« on: August 09, 2010, 03:21:15 am »
Right, that's because the bit command e is for 8 bit numbers.  ee will be for 16 bit numbers, also counting from the left, I just didn't have time to add that yet.  Also, I will add the auto-opts next version to extract specific bits.

Another reason for counting from the left is because its much more optimized using the add hl,hl instruction (for 16 bit numbers) than trying to shift the number to the right or adding overhead to negate the bit number, so its a more optimized routine.

942
The Axe Parser Project / Re: Axe Parser
« on: August 09, 2010, 01:14:00 am »
Almost, Ae4 would be 1 and Ae3 and Ae5 would be 0.  You start counting from the 0th bit to the 7th bit.  Its an advanced math command and it shouldn't be needed that often so don't worry too much if it seems confusing.  That particular command is aimed for assembly programmers although they might also hate me since its the reverse order of actual asm, but this convention actually makes more sense since data is usually read left to right like pixel data for instance.

943
The Axe Parser Project / Re: Bug Reports
« on: August 09, 2010, 12:57:49 am »
Okay, I was able to duplicate the error.  It appears to only affect very large source code and it is totally random and not dependent on pass.  I seemed to only get the error when the source was archived or auto-backups were turned off but I'm not sure what the problem is yet.  It shouldn't be too hard to track down though since at least i can replicate it after about 5 compiles.

944
The Axe Parser Project / Re: Bug Reports
« on: August 09, 2010, 12:12:47 am »
Hmm interesting, I haven't had any random crashing problems yet... I'll look into that.

Yes, the built-in subroutines are added to the Data section of the code in the order that they are first called and its mixed in around other data as well, even inline data.

945
The Axe Parser Project / Re: Axe Parser
« on: August 08, 2010, 09:55:34 pm »
I updated the doc to include more information about the backups and the new library header if you're curious about those.

I fixed my auto-backups now and much faster than I expected so I decided to use the extra time to see if I could easily implement the external library feature that everybody wants.  And that also was surprisingly not too difficult, but the only catch is that you can't nest libraries because each nested library needs 19 bytes of ram and I don't have enough space to have a big array for that.

A cool thing about the libraries is that those of you who hate having to scroll through all that data at the beginning of your program now have a solution!  You can create a separate file that contains nothing but your data in a separate file and then include it as a library as the first line of code in your main program.  The libraries work as direct insertions so its as if the same data were inserted right at that spot.  You can also keep these files archived so that you have even more free ram left to create the rest of your program.

There are a ton of other uses for this as well.   If you want to make a universal library like a physics engine for example, you can make the first line of the library file a jump to the last line so that it can be inserted once anywhere in the code and then the client has access to all the subroutines included in the library file.  Due to the expansion of available names in labels to 3 characters, you can be fairly sure that your label name isn't already taken with some clever prefixes.

And I didn't even start talking about the backups yet.   They are very strait forward so you can probably figure them out without needing any tutorial.  Selecting a backup restores it, pressing "del" deletes it, and pressing "B" on the source creates it.  In the options, there is a new mode to do it automatically.  That's about it, but its extremely useful.  Anyway, enjoy!

Pages: 1 ... 61 62 [63] 64 65 ... 135