Author Topic: Features Wishlist  (Read 606919 times)

0 Members and 5 Guests are viewing this topic.

_player1537

  • Guest
Re: Features Wishlist
« Reply #525 on: April 16, 2010, 06:54:51 am »
I'm not sure if this has been asked, but what about a line( routine, will we have that soon?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #526 on: April 16, 2010, 09:58:40 am »
Yeah it's coming soon it seems. There will also be circles and rectangles, according to the updated first post

_player1537

  • Guest
Re: Features Wishlist
« Reply #527 on: April 16, 2010, 04:34:11 pm »
woops, forgot about the first post being updated

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #528 on: April 16, 2010, 06:32:16 pm »
no problem :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #529 on: April 23, 2010, 05:51:56 pm »
Question:

How would somebody go about copying the entire content from an archived appvar/program into another, or parts of it? If for example, someone has a game with a lot of map data and it is spread between 3 appvars of about 7 KB each, currently, he has to use the Unarchive and Archive commands. However, in some cases, there would be a lot of archiving going on and loads of archiving means loads of defragmenting needed, wearing out both the player's set of batteries very fast and their Flash ROM as well (which happened to people, before, such as our last year TI-BASIC contest winner, Drummist).

If it is impossible, I wonder if it would be possible to implement a command that allows you to read bytes from an appvar stored in archive, or at least, something that can copy an entire program from archive into RAM?

For the later, you could ask Iambian if you could use XCOPY source for it if you need someone's routine. It may be useful in the future for people who wants to make slightly larger games (in terms of data, not executable code), but don't want to hinder the user with endless amounts of GarbageCollect messages (and risks of causing the game to crash/exit in improper ways due to him accidentally choosing No). Some of my old BASIC games got some bad reviews because of those.

[...] Also, since the BASIC game engine is too big to fit in ram, this means that there is quite a lot of archiving going on as you play... so be prepared for garbage collects every six minutes or so.

[...]

Overall: 12/40.
Perhaps on a Silver calculator, this game would be playable, but on an original edition it's just too frustrating to complete, unless you're the kind of person who enjoys spending money on batteries to see them drained by endless garbage collects. If it wasn't for this one point, this game would probably rate “Reign of Legends: at least a 30/40.


There is an ASM RPG called Final Fantasy v1.198 that won't fit in RAM and is split in multiple archived files. It copies the needed data in temporary RAM rather than unarchiving it. I think Desolate requires the data to be in RAM all the time, though.
« Last Edit: April 23, 2010, 05:57:16 pm by DJ Omnimaga »

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Features Wishlist
« Reply #530 on: April 23, 2010, 06:10:08 pm »
Perhaps that should be a new feature. :D
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #531 on: April 23, 2010, 10:24:50 pm »
Reading from archive isn't really that tricky, but it would certainly make the code a lot bigger and require new commands.  You can't just use a pointer; you have to switch pages, store data from that page to a register (temporary variable), switch pages back to the normal RAM, and then save the register into the RAM page at the desired location.  You have to do this for EACH byte or two byte combination you read which means its a lot slower than reading directly from ram.

I think it would really complicate things a lot and it would be about the same speed to unarchive it anyway as it would be to read all of the bytes from archive, although it would definitely be faster for individual bytes.  Putting the calculator in 15MHz mode during archive/unarchives is generally fast enough.  Reading a 6000 byte map by unarchiving would take less than a second to unarchive and especially for RPGs, a little loading bar once in a while isn't that big of a deal since it would never be in the middle of game play.  Just keep the data in ram until its no longer needed.

By the way, another trick I don't think many are aware of is that you can make the program archive ITSELF while its running so you effectively can use the entire free RAM if you need more.  Then unarchive it before you quit.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #532 on: April 23, 2010, 10:37:55 pm »
Well, my biggest issue about unarchiving the map data is that we have to re-archive it after usage. If in the RPG two areas that are linked together are in different files (for example a large dungeon where floor 1 through 4 would be in DARKDNG1.8xk and floor 5 through 7 in DARKDNG2.8xk), then when going back and forth through these areas, there will be a lot of archiving, unarchiving, archiving, unarchiving, archiving, etc, going on, and the player will be annoyed with Garbage Collect messages every 6 minutes or so (especially on a regular 83+ that only has 164 KB of archive). I don't mind archiving speed. Just one little appvar being archived will not even take a second on a 83+. The real issue is the constant Garbage Collecting messages that can take over one minute each.

Here's another scenario:

Player decides that once map finished loading, he needs to go in the menu. He starts holding down ENTER

GarbageCollect?
1: No
2: Yes

What does happen then?

Anyway just a feature suggestions, it's really up to you. Now that I look at your first paragraph, it seems like it may be more trouble than anything else x.x

I could maybe just have a warning during loading saying
"LOADING MAP
 PLEASE DO NOT HOLD ENTER!
 IF A GARBAGE COLLECT
 MESSAGE OCCURS, CHOOSE YES!
 ELSE THE GAME MAY CRASH!"

Or put it in readme altough people may miss it
Quote
By the way, another trick I don't think many are aware of is that you can make the program archive ITSELF while its running so you effectively can use the entire free RAM if you need more.  Then unarchive it before you quit.
Thanks for the trick. Question, though: when it comes time to exiting, do we need to run special commands to delete temporary data before unarchiving the program again? (so there's enough user RAM to unarchive it)
« Last Edit: April 23, 2010, 10:40:49 pm by DJ Omnimaga »

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #533 on: April 23, 2010, 10:42:56 pm »
I don't think there's such a thing as garbage collecting messages in asm.  I could be wrong, but I've never seen it or heard about it before.  Its possible it might ask when the program quits and hands control back to the OS though.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #534 on: April 23, 2010, 10:56:33 pm »
I am pretty sure if you archive stuff and there's not enough big enough free sectors available in archive that the GC message will pop up (providing you use the TI-OS routines/ROMcalls to archive/unarchive). The TI-83 Plus guidebook actually explains a bit about sectors. I am pretty sure BrandonW could maybe confirm this but he seems inactive lately

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Features Wishlist
« Reply #535 on: April 24, 2010, 04:49:37 am »
I don't think there's such a thing as garbage collecting messages in asm.  I could be wrong, but I've never seen it or heard about it before.  Its possible it might ask when the program quits and hands control back to the OS though.

I think you can trigger them in a call to _Arc_unarc, but I'm not sure. Anyway, I don't think the OS does 'sneaky' GC without warnings.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #536 on: April 24, 2010, 09:30:05 pm »
I'd like to ask about library files now.

First of all, I think they will be handled slightly differently than regular source files.  Their header will be in lowercase to distinguish them, and they won't show up on the compiling list to reduce clutter since they're never compiled standalone anyway.  The libraries will basically just be a big list of subroutines that can be called from the main program.

Next thing is how to reduce naming conflicts since the labels are only 2 letters.  Although I plan to eventually allow labels up to 8 letters, right now there is a high chance for duplicate labels, especially if there are multiple library files included in the main program.  To avoid this, I am thinking of having a prefix for the subroutines like this: sub(prgmMYLIB,DW) will call the subroutine "DW" from the "prgmMYLIB" library.

The nice thing about the libraries is that only subroutines you actually USE will get compiled into the code.  That means if a library has 25 different routines, but you're only using 5 of them, only the 5 that you use get put into the program.  There is going to have to be some slight restrictions to the subroutines however, mostly, they cannot allocate data or use regular goto's and sub's, only library subs (including itself).

I haven't written any of this yet, I want to get an opinion first.  Does anyone have any other ideas?
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #537 on: April 24, 2010, 09:50:48 pm »
mhmm, I'm a bit confused x.x I am not sure if I understand the concept well. What would be the benefit of libraries only including the sub routines you use in your compiled code when compiling a program normally alerady do this?

For example, if I have prgmA and it only contains .B in the code, the compiled version will be 13 bytes large (no-stub). In other words, stuff that is not used is not included, right?

I'm not sure if I get the concept x.x
« Last Edit: April 24, 2010, 09:51:37 pm by DJ Omnimaga »

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #538 on: April 24, 2010, 09:58:09 pm »
I am also a bit confused about what you're asking about.  A library is just a list of subroutines.  Like if somebody makes a tile mapper or physics engine or something, then you can call those routines from your main program.  Like if your program was prgmA and you said sub(prgmTM,D) this would call subroutine D (lets say that's a drawing command for the tile mapper) from the tile mapper library.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #539 on: April 24, 2010, 10:10:39 pm »
mhmm. Yeah I think I get it about the libraries. I guess they're like subroutines, but external?

I got stuck on the part saying this, though:

Quote
The nice thing about the libraries is that only subroutines you actually USE will get compiled into the code.

Since in the case of internal sub-routines, if there's a routine I don't need I just have to delete it altogether (and back it up elsewhere for later use), so there wouldn't be any advantage between using external and internal ones.

If it is unclear, I will probably move on for now, though, because it looks like there's something there that is way beyond my capacities of learning (of the moment) that I may be best waiting later to try to understand (at this point it will most likely be lost among 3 or 4 new pages of posts x.x)