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

Pages: 1 ... 31 32 [33] 34 35 ... 153
481
The Axe Parser Project / Re: Features Wishlist
« on: November 02, 2013, 01:47:11 pm »
I do agree that a customized editor would be nice. But is it necessary to actually build a custom editor program/application? I think the easiest way to implement a fairly simple but good Axe editor would be to keep using the built-in BASIC editor, but on top of the token hook, add a menu hook that adds menus specifically for the Axe commands.

If you start entering the realm of custom editor programs, you start moving away from the Axe project itself and into Axe IDE's, which can be made by a third party with about the same ease as I could. A custom-made Axe IDE would be awesome, but I should first and foremost be concerned with implementing the compiler and language features, and just adding the BASIC editor hooks as mentioned above because they're quick to implement.

482
The Axe Parser Project / Re: Features Wishlist
« on: November 02, 2013, 01:15:32 pm »
Axe has and will always support coding on-calc through the standard BASIC editor. And yes, 84+CSE support is planned for Axe 2.0. But please keep in mind that Axe is a huge project that has taken 3.5 years to get where it is, so redesigning it to support all these new things combined with all the old things is likely going to take a significant amount of time.

483
TI Z80 / Re: Tipover - the crate game <<contest 2013>>
« on: November 02, 2013, 01:08:31 pm »
* Runer112 sees that this uses grayscale and probably has lots of processing time to spare, so whispers something about GrayLib

Just a thought if you want to make a bit more polished. It would add some size, but I don't think a 4KB program getting pushed up to like 4.7KB (estimate) is much to worry about.

484
Axe / Re: Axe Q&A
« on: November 02, 2013, 12:58:48 pm »
Well this is awkward... inData(BYTE,PTR) returns the position of the first occurrence, while the new inData(BYTE,PTR,SIZE) returns the position of the last occurrence. That was done for extreme optimization purposes, and I don't think I ever considered the case where it would be used on data that contains the same byte multiple times... But that case is definitely one that it should handle, and you would then expect it to return the position of the first occurrence, wouldn't you...

Can you get away with it searching backwards for now? I can try to help implement a solution if you want.

485
Axe / Re: Program Icons
« on: November 01, 2013, 05:58:47 pm »
Are Mirage OS programs just like regular ASM programs except with the header?

I'm assuming you're talking about MirageOS assembly programs, in which case the answer is both yes and no. But primarily no. Yes because both are assembly programs that run natively on the calculator's z80 processor. No because, as you can see if you look at the MirageOS (or Doors CS) assembly header, they have a ret instruction right at the beginning so if they are run through the normal OS manner, they will return instantly. This is partly due to the other, more important "no" reason, which is that MirageOS and Doors CS provide libraries of useful routines which assembly programs with the shell header may rely on being present to use. For instance, it's quite common for assembly programs targeted at these shells to use the built-in screen update, sprite, and random number routines, among others. BASIC programs with a MirageOS header will not have this problem, as MirageOS provides no BASIC libraries. But Doors CS does, so BASIC programs with a Doors CS header also may rely on Doors CS being present.

486
The Axe Parser Project / Re: Features Wishlist
« on: November 01, 2013, 01:48:12 pm »
That is very much the ideal for the future of Axe.

487
Axe / Re: 8 Directional movement help
« on: November 01, 2013, 01:47:23 pm »
Hayleia's idea of combining all four arrow key states into one number is definitely the way to go. However, may I propose a combination function that returns values without the need of a lookup table?

getKey(1)-getKey(4)*3+getKey(3)-getKey(2)

If my logic is correct, this should return the following values:

  • -4: Left+Up
  • -3: Up / Left+Right+Up
  • -2: Right+Up
  • -1: Left / Left+Up+Down
  • 0: None / Left+Right / Up+Down / Left+Right+Up+Down
  • 1: Right / Right+Up+Down
  • 2: Left+Down
  • 3: Down / Left+Right+Down
  • 4: Right+Down

You could then store and access your sprite data like this:

Code: [Select]
.Sprite data
[FF80808080808080] .Left+Up
[FF00000000000000] .Up
[FF01010101010101] .Right+Up
[8080808080808080] .Left
[0000001818000000]→°DirNone
[0101010101010101] .Right
[80808080808080FF] .Left+Down
[00000000000000FF] .Down
[01010101010101FF] .Right+Down


.Later in the program...

.To get a pointer to a directional sprite
getKey(1)-getKey(4)*3+getKey(3)-getKey(2)*8+°DirNone



If you didn't actually want there to be a "no direction" sprite and have the sprite remain facing the way it was from the last keys pressed, I'd try coding in some logic like this:

Code: [Select]
.Initialize some direction
3→D .Down


.Later in the program...

.If the current arrow key state is an actual direction (≠0)
If getKey(1)-getKey(4)*3+getKey(3)-getKey(2)
.Store the new direction
→D
End

.Somewhere later, the sprite is displayed
Pt-Something(some_x,some_y,D*8+°DirNone)

In this case, the no direction sprite (0) should never be displayed, so the °DirNone sprite is a bit of a waste of space. However, if you want to be a crazy optimizer (I do), you can put some other sprite you need in your program in that spot. :P

488
ASM / [83+/84+ ASM] Various homescreen/parser hook questions
« on: October 31, 2013, 10:25:49 pm »
I wanted to see how simple it would be to make a nice tool to improve the homescreen math capabilities slightly. This thread will be designated for me asking how to do things!

First hurdle: displaying custom answers using the a=0 case of the homescreen hook.
  • How do I "properly" return an answer such that it acts just like any other homescreen result? Simply pointing OP1 to the new answer makes it display correctly originally, but you can't interact with it at all like scrolling it left/right if it's wider than the screen.
    • EDIT: Testing seems to reveal that storing the custom answer to Ans allows for scrolling to work. However, I'm not sure if this is the ideal solution, or if it is, if it's the full ideal solution. Another interesting thing of note is that the scrolling works fine with MathPrint enabled, even without saving the custom answer to Ans.
  • Is it possible to return something that's not a number (a string, basically) and have it display right-aligned?


Thanks in advance for any help!

489
TI Z80 / Re: Terminal 4.4.1
« on: October 31, 2013, 04:11:56 pm »
I went a little bit overkill, but I slightly optimized and turned my old free/total archive commands into a mini Axe library. It's fairly straightforward to use, consisting of two commands and one constant definition:

  • TotalArc(): Returns a string (no padding) representing the total number of bytes of user archive space for the host calculator model.
  • FreeArc(): Returns a string (no padding) representing the free number of bytes of user archive space.
  • °Arc: After either of the above calls, this points to a string representing the same number, but padded with spaces on the left to always be 7 characters wide.

The library is attached. Just send it to your calculator (preferable archive so you don't lose it in a RAM clear) and include it in your program anywhere as prgmARCLIB.

490
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: October 31, 2013, 12:14:49 pm »
Reset the carry flag for sbc hl,de it seems. :P

491
The Axe Parser Project / Re: Features Wishlist
« on: October 30, 2013, 05:55:02 pm »
Considering that nitty gritty compiler features like that were implemented by Quigibo and I frankly am still not entirely sure how his code for them works, I think I'd have to pass on implementing that. :P

I think the Axe 1.x version line is coming to an end anyways, so putting work into adding features to the actual compiler, which I hope to largely rewrite, would be a fair amount of work for code that would probably only ever exist in one or two versions of Axe. I hope to redo the general library system to be a more robust in the next major version of Axe, so I'll probably implement something that provides the same functionality as your suggestion, just in the different library format.

At this point, I'm looking to collect ideas for the future of Axe, but it'll be a ways off until I can implement them.

492
TI Z80 / Re: Terminal 4.4.1
« on: October 30, 2013, 12:38:09 pm »
There's a B_CALL that should be able to do most of the heavy lifting for you: B_CALL(_ArcChk). It returns the amount of free archive space, as would be reported in the memory management menu, as a big-endian 32-bit integer at memory location $839F. To be able to display this, you then need a routine to convert this value into a string.

Someone asked pretty much this same question a couple years ago. I gave an assembly solution for their question here, which has code to get both the amount of free archive space and the amount of total archive space as printable strings. If you'd like me to convert it into something usable in Axe, I can do that easily enough.

493
The Axe Parser Project / Re: Axe Parser
« on: October 29, 2013, 04:39:33 pm »
I'm of the opinion that your archive was just a bit messed up and that it wasn't Axe's fault. :P You should try Axe 1.2.2 again, and if it still doesn't work and you send over Calcsys as well, I can try to help debug it further.

494
The Axe Parser Project / Re: Axe Parser
« on: October 29, 2013, 04:25:38 pm »
I made a small update to Axe 1.2.2, fixing a bug with the formatting of error dumps. It wasn't at all worth making a new major release for, but I did replace the Axe 1.2.2 download with the updated version.

If you don't plan on dumping any errors, don't even worry about this update. If you do, but a bit of weird formatting isn't a huge issue for you (the dump is still fine I think, it's just formatted oddly), don't worry about this update, either. But if you do want properly formatted error dumps, grab the fixed version in the latest updates thread.

495
Axe / Re: Axe source questions
« on: October 28, 2013, 04:41:29 pm »
There is no built-in iteration mechanism to update grayscale in Axe. The programmer updates it whenever they choose to. Up to the LCD's refresh rate, which is around 60Hz, more frequent updating usually means better quality.

Pages: 1 ... 31 32 [33] 34 35 ... 153