Author Topic: Awesome Omnimaga rickrolling program.  (Read 31285 times)

0 Members and 2 Guests are viewing this topic.

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: Awesome Omnimaga rickrolling program.
« Reply #60 on: July 21, 2010, 10:26:26 pm »
Yeah, that way also the RIck Roller's Of Tomorrow text would do some sort of earthquake effect, which wouldn't look too good with a lot of text

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Awesome Omnimaga rickrolling program.
« Reply #61 on: July 21, 2010, 10:28:51 pm »
Ya, I just tested it sort of (I just modified nemo's code) and it doesn't look good at all.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #62 on: July 22, 2010, 08:21:12 am »
Oh, too bad :(
The other code looks good though, as I've already said. :)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Awesome Omnimaga rickrolling program.
« Reply #63 on: July 22, 2010, 08:29:59 am »
Thank you. Has anyone been able to spot any optimizations at all?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #64 on: July 22, 2010, 05:00:19 pm »
Here's my version. It's lightning-fast and it's only 291 bytes on-calc.

Spoiler For Coder's Comments:
I so horribly cheated. It's an ASM program being called by a BASIC program. Here's the code for the ASM program:
Code: [Select]
;Test condition
;Rickrollers of tomorrow.
#include "ti83plus.inc"
.org $9D93
.db $BB,$6D
;Character mappings:
;  o   m   n   i   m   a   g   a
; $C7 $6D $C4 $D7 $6D $BB $67 $BB
 ld hl,0
 ld (currow),hl
 ld hl,RightString
 bcall(_PutS)
 ld a,'w'
 bcall(_PutMap)
 ld c,0    ;counter for the scrolling text
MainLoop:
 bcall(_getcsc)
 or a
 jr nz,Exiter
 ld hl,0
 ld (currow),hl
 call ASubroutine
; push bc
;  ld bc,0
;  dec bc
;  ld a,b
;  or c
;  jr nz,$-3
; pop bc
 jr MainLoop
Exiter:
 bcall(_ClrLCDFull)
 ld hl,0
 ld (currow),hl
 ret
ASubroutine:  ;writes the text out onto the screen
;curRow=y curCol=x
 ld b,8  ;loop counter. Drawing down like that.
 ld e,c
SubLoop:
 ld hl,PositionTable
 ld d,0
 add hl,de
 ld a,(hl)
 push af
  or a
  jr z,$+3
  dec a
  ld (curCol),a  ;position from left edge
 pop af
 push de
  ld hl,TheOmnimaga
  ld e,a
  add hl,de
 pop de
 or a
 jr z,$+9  ;skip over leading space write if on left edge
 push af
  ld a,' '
  bcall(_PutC)
 pop af
 push af
  ld a,(hl)
  bcall(_PutC)
  inc hl
  ld a,(hl)
  bcall(_PutC)
 pop af
 cp 6
 jr z,$+7  ;skip over trailing space write if at middle of screen
 ld a,' '
 bcall(_PutC)
 ld hl,curRow
 inc (hl)
 inc e
 djnz SubLoop
 inc c
 ld a,c
 cp 12
 ret nz
 ld c,0
 ret
 
 
 
 
 









RightString:
.db "11      The     "
.db " 22             "
.db "  33    Rick    "
.db "   44   Roller",$27,"s"
.db "    55          "
.db "     66 Of      "
.db "      77        "
.db "     88 Tomorro",0


TheOmnimaga:
.db $C7,$6D,$C4,$D7,$6D,$BB,$67,$BB  ;04
PositionTable: ;13 width, pad 8 more.
.db 0,1,2,3,4,5,6,5,4,3,2,1,0,1,2,3,4,5,6,5,4,3


.end
.end
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #65 on: July 22, 2010, 05:03:27 pm »
lol Iambian :P IMO it would've been worse if you had used Celtic III ;D
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Awesome Omnimaga rickrolling program.
« Reply #66 on: July 22, 2010, 05:11:27 pm »
Here's my version. It's lightning-fast and it's only 291 bytes on-calc.

Spoiler For Coder's Comments:
I so horribly cheated. It's an ASM program being called by a BASIC program. Here's the code for the ASM program:
Code: [Select]
;Test condition
;Rickrollers of tomorrow.
#include "ti83plus.inc"
.org $9D93
.db $BB,$6D
;Character mappings:
;  o   m   n   i   m   a   g   a
; $C7 $6D $C4 $D7 $6D $BB $67 $BB
 ld hl,0
 ld (currow),hl
 ld hl,RightString
 bcall(_PutS)
 ld a,'w'
 bcall(_PutMap)
 ld c,0    ;counter for the scrolling text
MainLoop:
 bcall(_getcsc)
 or a
 jr nz,Exiter
 ld hl,0
 ld (currow),hl
 call ASubroutine
; push bc
;  ld bc,0
;  dec bc
;  ld a,b
;  or c
;  jr nz,$-3
; pop bc
 jr MainLoop
Exiter:
 bcall(_ClrLCDFull)
 ld hl,0
 ld (currow),hl
 ret
ASubroutine:  ;writes the text out onto the screen
;curRow=y curCol=x
 ld b,8  ;loop counter. Drawing down like that.
 ld e,c
SubLoop:
 ld hl,PositionTable
 ld d,0
 add hl,de
 ld a,(hl)
 push af
  or a
  jr z,$+3
  dec a
  ld (curCol),a  ;position from left edge
 pop af
 push de
  ld hl,TheOmnimaga
  ld e,a
  add hl,de
 pop de
 or a
 jr z,$+9  ;skip over leading space write if on left edge
 push af
  ld a,' '
  bcall(_PutC)
 pop af
 push af
  ld a,(hl)
  bcall(_PutC)
  inc hl
  ld a,(hl)
  bcall(_PutC)
 pop af
 cp 6
 jr z,$+7  ;skip over trailing space write if at middle of screen
 ld a,' '
 bcall(_PutC)
 ld hl,curRow
 inc (hl)
 inc e
 djnz SubLoop
 inc c
 ld a,c
 cp 12
 ret nz
 ld c,0
 ret
 
 
 
 
 









RightString:
.db "11      The     "
.db " 22             "
.db "  33    Rick    "
.db "   44   Roller",$27,"s"
.db "    55          "
.db "     66 Of      "
.db "      77        "
.db "     88 Tomorro",0


TheOmnimaga:
.db $C7,$6D,$C4,$D7,$6D,$BB,$67,$BB  ;04
PositionTable: ;13 width, pad 8 more.
.db 0,1,2,3,4,5,6,5,4,3,2,1,0,1,2,3,4,5,6,5,4,3


.end
.end


For a second there I thought I had horribly been outdone :P
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline chrisf1337

  • LV2 Member (Next: 40)
  • **
  • Posts: 21
  • Rating: +1/-1
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #67 on: July 22, 2010, 09:59:37 pm »
That's some rickroll win there.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #68 on: July 23, 2010, 12:22:21 pm »
That's awesome!  Great job Iambian!  * ZTrumpet hands Iambian a cherry. ;D

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #69 on: July 26, 2010, 10:51:03 am »
I have a version at 240 bytes on calc, flickers a bit, see the source code for why:

Quote from: BASIC Code
:ClrHome
:1→A
:1→B
:For(θ,1,8
:Disp "
:End
:While 1
:"σmπimαgα→Str1
:Output(8,A,sub(Str1,A,2
:Output(1,9,"  
:Output(3,9,"    
:Output(4,9,"        
:Output(6,9,"  
:Output(8,9,"        
:Disp "
:Output(1,9,"The
:Output(3,9,"Rick
:Output(4,9,"Roller's
:Output(6,9,"of
:Output(8,9,"Tomorrow
:A+B→A
:If A=7 or A=1
:-B→B
:End
Generated by SourceCoder, © 2005-2010 Cemetech
« Last Edit: July 26, 2010, 10:51:53 am by yunhua98 »

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

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: Awesome Omnimaga rickrolling program.
« Reply #70 on: July 29, 2010, 04:57:21 pm »
Nnice, kinda flickery but it's quite small and fast. Nice job :)

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Awesome Omnimaga rickrolling program.
« Reply #71 on: July 29, 2010, 06:02:48 pm »
thanks, I tried replacing the "omnimaga" with the Lyrics to "Never Gonna Give You Up"  It was epic.  ;)

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

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: Awesome Omnimaga rickrolling program.
« Reply #72 on: July 29, 2010, 08:21:48 pm »
Lol nice. Wouldn't it slow down far into the string, though? I remember when scanning through large strings, near the end it was much slower.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Awesome Omnimaga rickrolling program.
« Reply #73 on: July 29, 2010, 09:11:16 pm »
I managed to get yours down to 190 bytes with a one letter name :)

Code: [Select]
ClrHome
1→A
Ans→B
For(Θ,1,7
Disp "
End
Repeat 0
Output(8,A,sub("σmπimαgα",A,2
For(C,1,8
Output(C,9,"________
End
Disp "
Output(1,9,"The
Output(3,9,"Rick
Output(4,9,"Roller's
Output(6,9,"Of
Output(8,9,"Tomorrow
A+B→A
If A=7 or A=1
-B→B
End

The flicker is a just a little more noticeable since it goes from top to bottom.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Awesome Omnimaga rickrolling program.
« Reply #74 on: July 29, 2010, 09:26:32 pm »
Nice, it gets smaller and smaller