Author Topic: Ti 84+cse prgming questions  (Read 11230 times)

0 Members and 1 Guest are viewing this topic.

Offline dreamdragon

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +6/-19
  • Dragon born and Dragon raised.
    • View Profile
Ti 84+cse prgming questions
« on: January 29, 2014, 01:49:44 pm »
hey guys!
i really want to prgm a strobe light for my calc...
however i dont know how to implement the drawing commands...
no one seems to come up with new prgms for the calc so i wish to be the spark that starts the inferno so-to-speak  8)

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #1 on: January 29, 2014, 01:59:16 pm »
Well...I can't help you there.

I don't have much CSE experience either, and my recent practice with the BackgroundOn command was to no avail.

I just don't think it's fast enough.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Ti 84+cse prgming questions
« Reply #2 on: January 29, 2014, 03:26:16 pm »
hey guys!
i really want to prgm a strobe light for my calc...
however i dont know how to implement the drawing commands...
no one seems to come up with new prgms for the calc so i wish to be the spark that starts the inferno so-to-speak  8)
I think drawing will always be rather slow for a strobe light. I think the best you can do is making the screen completely white, and then use some asm code to turn the backlight of the LCD on(at maximum brightness) and off in a loop (with some delay, off course).
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ti 84+cse prgming questions
« Reply #3 on: January 29, 2014, 03:41:32 pm »
I don't know what happened to my post, since I posted earlier, but which drawing commands do you need help in? I know TI-BD wiki has a lot of doc, but it doesn't include the extra color arguments.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #4 on: January 29, 2014, 08:28:47 pm »
I believe it was calculated that the theoretical maximum framerate when drawing a solid color to the screen was 7FPS. You could double that by using the half-horizontal resolution mode, but this is all using assembly language.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ti 84+cse prgming questions
« Reply #5 on: January 29, 2014, 09:40:07 pm »
Actually I think it's closer to 5 FPS, according to a program by Kerm. However, if you invert the LCD using the built-in features it's practically instant inverting.

Offline dreamdragon

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +6/-19
  • Dragon born and Dragon raised.
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #6 on: January 30, 2014, 08:03:02 am »
I don't know what happened to my post, since I posted earlier, but which drawing commands do you need help in? I know TI-BD wiki has a lot of doc, but it doesn't include the extra color arguments.

i was wondering if i could use the pxlon/off/change....  <_<
i would like to bet that that would work...... ;)
(lol redundancy that makes sense.... "bet that that...."  ;D )

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Ti 84+cse prgming questions
« Reply #7 on: January 30, 2014, 09:05:19 am »
I don't know what happened to my post, since I posted earlier, but which drawing commands do you need help in? I know TI-BD wiki has a lot of doc, but it doesn't include the extra color arguments.

i was wondering if i could use the pxlon/off/change....  <_<
i would like to bet that that would work...... ;)
(lol redundancy that makes sense.... "bet that that...."  ;D )
Pxl-on/off/change will be way to slow for a strobe light. Even on the b&w calculators, filling the entire screen with Pxl-on takes nearly a minute. Unless you are fine with a strobe light of only 1 pixel.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline dreamdragon

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +6/-19
  • Dragon born and Dragon raised.
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #8 on: January 30, 2014, 09:05:55 am »
what about alota pixels?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: Ti 84+cse prgming questions
« Reply #9 on: January 30, 2014, 01:40:41 pm »
About 4 3x3 squares with an empty 7x7 square surrounding them will most likely blink at 6-7 frames per second max. I am unsure if it's accurate, but I once used pt-on/off to draw Link sprites and that's approximately what I got.

Offline dreamdragon

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +6/-19
  • Dragon born and Dragon raised.
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #10 on: January 30, 2014, 02:07:54 pm »
i actaully just made it in 30 secconds.... ._.
if one examines the real( statements in col mode on can actually put the invert and default settings of the display and have them loop...
like...

Clrhome
lbl0
real(0,3,2     <- this inverts it
real(0,3,0    <- this one and the below one switches it back to default
real(0,3,3    

Goto 0

it was so freakin easy ;D
and the result is more than i expected  :w00t:
the speed between the three real(s      is so quick that it actually looks like a strobe light..
it was so freakin awesome the first time i ran it...
i created another that makes the graph screen strobe...
hell there is like no decrease in speed even with an image on...
however if i have graph/table selected it really slows down...
but i have a technical question:
if i left it running the strobe light could i damage the screen?
D:
« Last Edit: January 30, 2014, 02:10:51 pm by dreamdragon »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #11 on: January 30, 2014, 02:50:33 pm »
Could you replace that "Lbl 0" with "While 1" and "Goto 0" with "End" ? I recall from when I was programming in Basic for my 83+ that While loops were faster than Gotos, and I read somewhere that memory leaks can occur with Gotos.
« Last Edit: January 30, 2014, 03:22:19 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #12 on: January 30, 2014, 04:40:57 pm »
Never heard of screen damage from strobes. In fact, the method for producing grayscale on monochrome displays strobes the pixels in a checkerboard pattern, and strobing is used to fix stuck pixels.

Offline dreamdragon

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +6/-19
  • Dragon born and Dragon raised.
    • View Profile
Re: Ti 84+cse prgming questions
« Reply #13 on: January 30, 2014, 04:48:30 pm »
Could you replace that "Lbl 0" with "While 1" and "Goto 0" with "End" ? I recall from when I was programming in Basic for my 83+ that While loops were faster than Gotos, and I read somewhere that memory leaks can occur with Gotos.

what a great idea! i will go back into my five lines of code and alter them....
although i have to admit the speed with gotos is insane....


Offline Lunar Fire

  • LV3 Member (Next: 100)
  • ***
  • Posts: 66
  • Rating: +7/-1
  • I'll be watching you from the shadows
    • View Profile
    • My Tumblr
Re: Ti 84+cse prgming questions
« Reply #14 on: January 30, 2014, 07:19:14 pm »
In time, you'll learn that the Goto command is counter-indicated in almost all of the programming languages existing, because it breaks the flow of your program. In TI-BASIC thought there is a lack of essential alternatives (like subroutines), so you can't really avoid it.

However, your case is one in which you can use a more efficient structure, which is the While loop. It will make your code a bit faster and you can program an exit condition if you need to.

I'm going to give you an exit condition to try out. How would you change your code to exit the strobe by clicking Enter?

To do this you'll want to know how the While condition works (why While 1 loops infinitely) and how to read keystrokes. After that it should be fairly easy to pull it off.

Good luck ;D
Your drill is the drill that will pierce the heavens!