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 ... 92 93 [94] 95 96 ... 135
1396
Half byte smooth scrolling IS feasible with the intelligent use of subroutines.  Instead of reading the tiles using the simple single byte system {Y*width+X} you can read them with a subroutine that takes X and Y as input and then outputs the tile.  So it effectively becomes no more difficult than regular full byte smooth scrolling, you just have to add the additional subroutine.  You can even modify an existing smooth scrolling engine to become half byte compatible.  I wrote a subroutine you can use here.  The speed should not be very different than full byte when done correctly.  One speed optimization you can do is /2/2/2/2 instead of /16 if you do run into slowdowns.

1397
Miscellaneous / Re: Where I've Been
« on: June 03, 2010, 11:57:30 pm »
Welcome back!

The reason the Axe forum has kind of exploded over the last few days is that the program got featured on tical, THEN omnimaga announced the Axe programming contest, and THEN the programming contest got featured on ticalc as well.  Its really crazy right now, I try to be as helpful as possible but I can barely keep up with the posting there.  Luckily there's some other members who know the language well enough to fill in the gaps.

Cool web stuff by the way :)

1398
The Axe Parser Project / Re: On Calc Documentation
« on: June 03, 2010, 11:03:34 pm »
There will eventually be some on-calculator help.  That's why the help button is there.  It will take a lot of time to write though, which is why I'm not going to add it until the end.

1399
I have the newer 84 with the slower LCD by the way.  I'll see if this fixes it.  Although, I would rather the user not need to do this when running axe games.

1400
The Axe Parser Project / Re: Axe Parser
« on: June 03, 2010, 07:02:42 pm »
I don't know exactly what is the reason for it, but my program that started within a second with version 0.2.5, now takes 2 seconds to startup. is this perhaps because of the interrupts? of could it be so because of I start my program with a pretty complex for-loop? Has that become slower?

Are you unarchiving something at the start of the program?  Garbage collecting can make it go much faster if archiving/unarchiving begins to slow down over time.

1401
Axe / Re: Map editor help: more appvar reading/creating issues
« on: June 03, 2010, 01:40:27 pm »
Did you zero the data in the appvar before looking at the map?

:"vMAP"→GDB1
:Return!If GetCalc(GDB1,16800)->A
:fill(0->{A},16799)

The reason I suggested the one byte at a time method was because I though this might be a boundary problem where you went past the end of the data at the bottom resulting in random tiles being shown.  I don't know how to restrict the movement with a single variable used for both coordinates which is why I split it up.

1402
You don't have to delete your post, there's nothing wrong with announcing it.  Its only if you feel that your project is at risk of being copied or having a story line that could be spoiled that I would recommended giving away less details.  Its nice to have at least a name or codename so at least people know what you're working on.  And by announcing your projects you can get other people's opinions and suggestions of what they like to improve your entry even more.

1403
Also, no one is required to announce anything, you can still keep it secret if you want.  It will be to your advantage to not give too many details away so that the release brings some surprises and your entry is less likely to be cloned, especially if you have a unique idea.  But at the same time, it allows you to hype your projects, show off some cool screen shots and teasers, and makes it easier to ask others for help without breaking any rules.

1404
Axe / Re: Map editor help: more appvar reading/creating issues
« on: June 03, 2010, 05:17:03 am »
First thing I noticed is that you're scrolling by 2 bytes at a time when moving left and right since these are half bytes.  What I would to do make this less of a nightmare is to write a subroutine that returns the sprite number times 8 (the sprite index) at a given a coordinate position on the map.

Code: [Select]
:.Input
:.D=x-position
:.Ans=y-position
:
:Lbl XY
:{*120+(D/2)+data}→C
:If D^2
:C^16*8
:Return
:End
:C/16*8
:Return

Use different temporary variables if C or D are locked up.

This makes it much easier to draw maps and read tiles:
Code: [Select]
:For(A,0,11
:For(B,0,6
:A+X→D
:Pt-On(A*8,B*8,B+Ysub(XY)+Pic1)
:End
:End

Here I'm not using L, I'm using an X and a Y coordinate since its much easier to program and there is less math to do.  Only downside is that now you need 2 variables to keep track of position instead of 1.

X must be in the range 0-227 and Y must be in the range 0-133 otherwise you're drawing random garbage outside the appvar.

1405
Actually, I just tried this on hardware, and its too fast for even 6MHz.  But not to worry, I can group some of it into a subroutine to both add the needed delay and reduce the size of the code at the same time.

1406
Yeah, I think it will be worth the size increase.  Its a 46 byte increase, but it has the added bonus that it doesn't need to be initialized with a separate command (after I modify this routine).  Also, I think there are a few places I can optimize to save on memory, but still not hinder the speed.

EDIT: Actually that code is pretty rock solid optimized, there were only a couple places I made improvements.

In the entry points, its better if the instructions are in this order:
Code: [Select]
ld a,c
cp $2c
jr z,__Disp4LvlDone
ld h,plotSScreen >> 8
inc l
ld b,64
inc c
out ($10),a

Because this way, it jumps out of the loop sooner when it gets to the end of the routine.  Not that big of a deal, but it saves several clock cycles each render.

Also, the jump table I changed to this:
Code: [Select]
inc (iy+asm_flag2)
jr z,__Disp4Lvlentry3
ld a,(flags+asm_flag2)
inc a
jr z,__Disp4Lvlentry2
ld (iy+asm_flag2),-2
So that you don't need to initialize the byte that keeps track of gray layer since it falls through if the number was uninitialized.

Thanks again!  This does look a lot better  ;D

1407
Axe / Re: Help maps
« on: June 02, 2010, 06:08:02 pm »
Asm() is only to execute asm code.  Use the brackets for data.

To view the code more easily, you can write:
Code: [Select]
[ row1 ]->Pic1
[ row2 ]
[ row3 ]
...
[ row8 ]

You are using a 12x8 map with 8x8 tiles correct?

1408
Thanks!  Although that looks much larger than my current routine, I'll have to see if the improvement in speed/quality is significant enough to justify the size increase.  I'll do some more testing this week.

1409
The Axe Parser Project / Re: Axe Parser
« on: June 02, 2010, 03:49:17 am »
Yes, but the way it optimizes now, its actually more optimized to type it normally than it was doing it the "optimized" way before :)

1->{L6}
2->{L6+1}

Doing this is only 12 bytes now.

2->{1->{L6}+1}

This used to be more than 20 bytes I think in the old version.

EDIT: actually, you can do this now that I think about it:

1->{L6}+1->{L6+1}

That's only 10 bytes!

1410
Axe / Re: Self-modifying code
« on: June 02, 2010, 03:33:12 am »
Quite simply, no.  Self modifying code is not possible without disassembly of the generated programs becasue you need to get the address of the instruction to modify.  This is a bad practice becasue future versions and new optimizations change the size and order of the code which means you lose compatibility with newer versions.  That doesn't even include the fact that every time you modify your code, you have to disassemble again to get the address since it changes with how many bytes come before the SMC.  And yet another thing, it doesn't actually save very much space nor speed especially for the effort you would have to go through to implement it.  This does require greater than average assembly knowledge to do.

EDIT: Oops! I misread your post.  If you just want a write back, you can do this with axe commands by copying the running program in ram (address E9D93) into the program itself which you can get via the getcalc() command.  You can also get the size of the amount of data you need to copy with that command by reading the 2 byte number directly before the pointer.

Pages: 1 ... 92 93 [94] 95 96 ... 135