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

Pages: 1 ... 14 15 [16] 17 18 ... 108
226
So I guess the question we all have to ask is, how well does it work?

The best way to simulate a real calculator would be to go into wabbitemu and set the grayscale on steady freq at ~63Hz with 4 shades. (From my experience, 63 is average with the upperbound at 66 and lower at 59).

For comparison, here's chess at 63Hz with 4 shades:

Where 173 is the correct setting.

If you can match that with axe, I'll be impressed :D


227
ASM / Re: Keeping track of events in RPGs
« on: October 01, 2012, 06:34:27 pm »
arrays filled with "switches"(basically if it's on, 1. If it's off, 0) will help you a lot. Also, something dynamic, like chests, could be drawn over tilemap based on the "event switch" is 0 or 1.

Building on this, here's by far the best way to actually do this. If you look at the list of memory addresses, you see this:
Code: [Select]
saveSScreen equ 86ECh
asm_prgm_size equ 89ECh
bstCounter equ 89EEh
flags equ 89F0h

Now, of course to you, this doesn't mean that much. But what's neat about this is that IY points to flags. Whenever you go to use a system flag, what you are doing is accessing $89F0 + [flag offset]. Now, this is what everyone is used to. But, look what comes before flags, 2 random addresses, and then saveSScreen! What makes this great is that IY can actually address backwards.

Ok, so to put some numbers on this.

IY is pointing to $89F0
The last byte of saveSScreen is at $89EB
The gap there is 4 garbage bytes
IY can go as far back as -128

So, put these numbers together and you can have 124 bytes of flag data. That's 992 flags.



Implementing this:
First of all, your flag data will be from $8970 to $89EB.

To access it, you would use "bit flag_bit, (iy - flag_offset)". Now, this works fine and dandy, but to be honest, remembering both the bit and the offset is rather annoying. This is in my opinion one of the pitfalls of TI's flags. So, a better solution is to create a macro.

This macro is for SPASM, if you use TASM then toggle won't work, and if you use Brass, I doubt any of it will work.
Code: [Select]
#define b_(bit) bit&7
#define f_(flag) -flag/$10 - 4

#define bit_(flag) bit b_(flag), (ix + f_(flag))
#define set_(flag) set b_(flag), (ix + f_(flag))
#define res_(flag) res b_(flag), (ix + f_(flag))

#macro toggle_(flag)
ld a, (ix + f_(flag)) 
xor 1 << b_(flag)
ld (ix + f_(flag)), a
#endmacro

That probably scares you, so let me explain.
- bit_(flag_name) is just like bit
- res_(flag_name) is just like res
- set_(flag_name) is just like set
- toggle_(flag_name) will toggle that bit

And to define flags, you do something like this:
Code: [Select]
flag0 equ $00
flag1 equ $01
blah equ $02
blahh equ $03
flag4 equ $04
flag5 equ $05
flag6 equ $06
flag7 equ $07
flag8 equ $10

The first number is the offset, and the second number is the bit. You can just keep this general pattern up for a while. I have to go now, but if you run out of flags using this method (the highest is $F7, let me know and I'll tell you how to continue).

And to invoke the flag commands:
Code: [Select]
set_(flag1)

Will set flag1


Edit:
   992 flags, not 496

228
ASM / Re: RAM Used in graphing
« on: September 30, 2012, 11:58:31 am »
I've never looked into anything related to graphing, so I can't help you there. But if ram is what you're after, I have the answer.

229
General Calculator Help / Re: ti connect failing
« on: September 30, 2012, 11:54:48 am »
I'm assuming direct USB?

Anyways, I would guess that if you uninstall and reinstall ti-connect, it will work. If you are on a 32 bit machine, then you can completely uninstall ti-connect by following the instructions in that tutorial the squidgetx mentioned. Sometimes the drivers get a little screwy. (You can even uninstall the drivers on a 64 bit machine, but so far, I don't think any one has had any trouble with that.)

230
Axe / Re: How to make a 2 pages app with only data on the second page ?
« on: September 27, 2012, 05:02:13 pm »
Without modifying Axe, here's what the solution would look like:

First, you would have to make the information that's going to go on the data page. I'm not exactly sure how you would go about doing this in a nice manner, but I guess your choices would be an all data axe program, making an all data asm program (easier than you think), or hex editing a file (scary).

At this point, you would have to know the locations of all of the data structures in this file. So data1 at 0000, data2 at 0010, data3 at 001A, etc. This would be a rather mess to do by hand, which is why I suggested the asm program. (You could simply .echo all of the labels for the data).

An axiom would have to be created to access this data. What you would do is pass the axiom the pointer to the data, the size of the data, and where you want to put it in ram. The main problem here is that these would have to be static addresses, you could make them all variables, but every time you mess with the data page, you're going to have to resynchronize.

The last step, which is also the sketchiest step, would be to compile you program with axe, and then use another program to slap the data onto the back of the app and fix all the header information. This can be done, it's just a little messy.


So, without modifying axe, that's what the solution would be. I could do it, but I feel like the manual data location thing would get annoying really fast. Imaging having 100 different data segments and you add a byte to the first one, that's a lot of number changing. (Though, xeda could do it)

And of course, since it's me, I'll offer the alternative of fullrene.

Edit:
    I suppose an Axe include file could fix the label issue, I'm just not sure how to generate one from the input data.

231
TI-BASIC / Re: Correlation Compiler
« on: September 26, 2012, 11:52:24 pm »
If we're going to link him, we might as well get him the one with an updated readme. zStart on ticalc.org

(Though, to be fair, the one in my signature will always point to the most recent update in the forums)

232
TI Z80 / Re: MP3's from flash drive
« on: September 26, 2012, 12:14:56 am »
We can already play MP3's as shown here: http://www.ticalc.org/archives/files/fileinfo/354/35424.html
And we can already download from flash drives as shown here: http://www.ticalc.org/archives/news/articles/13/139/139572.html

So why not combine the 2? You would have a program that downloads "chunks" of data from the drive, plays them, and then deletes them. This would obviously have problems, the first coming to mind is speed, but does this seem like a possiblity?

Well, first of all, I'd like to point out that the "MP3's" you are talking about are similar to MIDI files. (Old cell phone ringtones).


The 84+ has been able to play music for quite some time now. It started real Real Sound (the video is gone) which could only work on the calculators with the extra ram. Then I made TruSound (youtube) which allowed the newer calculators to play sounds as well.

Now, both of these programs played .WAV files. If you know much about song formats, you know that .WAV files can be around 5x as big as MP3 files. The reason for this is that MP3 files are compressed to a smaller size. Like shmibs said, this compression algorithm is very complex and some computers running windows 2000 cannot even play them properly without skipping. What makes .WAV files convenient is that they are already in the format that is required to play sound while MP3 is not.

The obvious solution to the MP3 problem would be to decode the files ahead of time, but the 84+ only has 48KB or 128KB of ram (HW differences) and at 128Kbps, that means you'll get either 3 seconds or 8 seconds of song before the program would have to decode the next section which could take another 3 to 8 seconds. (TruSound uses a little compression, but it only cuts off around 20% of the file size)


Anyways, that's why MP3 doesn't work. As far as the USB half of it, I didn't think it was possible, but SirCmpwn proved us wrong. The trouble with sound over USB is that you have to try to get the USB port to cooperate with you fast enough to keep up with the song. Not only that, but you have to manage your cpu time because playing sound requires around 60% of the processor time when optimally configured and USB is a finicky thing that doesn't like to be interrupted.

Now, I say SirCmpwn proved us wrong, but like everyone has said, he never actually released his program. So while his youtube video made the music sound nice, I would honestly bet that it was a little scratchy. But, to be fair, he did manage to play recognizable music from a flash drive.


Finally, since you seem to be excited about playing songs on your calculator, I'll have to point you to another one of my projects, TruVid. (youtube)

233
TI Z80 / Re: AxeSh, a shell written in Axe/ASM, for Axe programmers
« on: September 20, 2012, 12:30:31 am »
Congratulations on being the second person to use the Axe API ;D


In other news, as you said you don't use any hooks. So there is zero chance of causing compatibility problems with any other apps.

234
TI Z80 / Re: zStart - an app that runs on ram clears
« on: September 16, 2012, 04:53:01 pm »
I got a idea how to make it moar awesome!
Well, i have that one program run on zstart you made ages ago penguin
aaaaaaand, i have symbolic
symbolic doesn't play nice with it
but if i run graph3in on homescreen and then enter graph3 menu everything is working fine
so, why not add a option for a program to run on homescreen? :D

I run them in exactly the same way, I'm not sure why it would make a difference.

My best guess is that symbolic and graph3 are fighting with hooks, so I don't think you are going to have a nice fix for this.

235
TI Z80 / Re: The Impossible Game
« on: September 10, 2012, 11:38:42 pm »
Off to make an Impossible Game! Someone else, if anyone's interested, should probably do this because it's gonna take me A LONG TIME :(

Yeah, the source isn't going to help you in the slightest. It's written in asm which means there's going to be a lot different, a few problems:
  • It's a foreign language to you (unless you know x86 asm or something)
  • Asm is structured soooo much differently than Lua
  • It's specifically optimized for the structure of asm (in fact, most of the code that draws the sprites is generated at run-time)
  • Lastly, it's not all that difficult of a game to make



So, I would recommend you try to make it yourself and find a way to use my level data (that would be a lot of typing (though, I had to do it from a youtube video so...)).

However, if you want the source, it's somewhere on this thread.

236
ASM / Re: Z80 ASM Help
« on: September 07, 2012, 07:19:37 pm »
First of all, I love that you've lurked long enough to know about calc84 and I. But anyways:

1. For inputting stuff in asm, really, you're going to have to write it yourself. There aren't really any OS routines you could use that will give you what you want.

So, for my example, I'm going to use bcall(_getCSC) and I'm going to ignore 2nd related stuff. (Pressing [,] will just be E).

Here is my most commented routine ever:
Code: [Select]


;#####################################
;Type name
;output: HL = pointer to input string
; carry = user quit

bufSize equ 10 ;this is how long you want the buffer to be
buffer equ saveSScreen ;put this wherever you want

typeName:
bcall(_clrTxtShd) ;if you don't do this, letters will appear under the cursor
ei
set curAble, (iy + curFlags) ;we'll use the OS's cursor since it's easier
ld de, buffer ;de is going to be the pointer
ld b, 0 ;b will be how many characters have been entered

ld hl, 0*256+0 ;this is going to start at (0,0), change this to whatever you want
ld (curRow), hl
typeLoop:
halt ;putting a halt in this loop decreases battery use by like 90%
bcall(_GetCSC) ;this gets whatever key was press (physical key, no 2nd crap)
or a ;was a key pressed
jr z, typeLoop ;no go back around

cp skEnter ;sk[Key pressed] because we're using getCSC
jr nz, notaEnter

ld a, b
or a
jr z, notAEnter ;0 length input is silly
xor a
ld (de), a ;null terminator turns this into a string, you don't have to do this
call curOff
res curAble, (iy + curFlags) ;kill the cursor
ld hl, buffer ;might as well return a pointer
or a ;this resets the carry flag, carry means user quit
ret

notaEnter:
cp skDel
jr z, delTa
cp skLeft ;since we're not the OS, pressing left is going to delete a number
jr nz, notBackSpace
delTa:
ld a, b
or a
jr z, typeLoop ;don't do it if there's nothing there
call curOff ;prevent hanging cursor

ld hl, curCol ;move the cursor back
dec (hl)

dec de ;move the pointer back
dec b ;decrease the number of letters
ld a, ' '
bcall(_PutMap) ;put a blank without moving the cursor

call cursorOn
jr typeLoop

notBackSpace:
cp skClear
jr nz, notClearz ;I have clear quitting, you can do other stuff if you want

call curOff
res curAble, (iy + curFlags)

scf ;this lets the calling routine know you quit
ret

notClearz:
ld c, a
ld a, b
cp bufSize
jr z, typeLoop ;if it's too big, accept no more input
ld a, c

sub skChs ;this is the neg button, it's the lowest value key we want (sk value)
jr c, typeLoop ;if it's under skChs ($11) we don't want the key
cp skComma-skChs+1 ;skComma ($25) is the highest value we will accept
jr nc, typeLoop

ld hl, charTable

add a, l ;this little section is HL + A
ld l, a
jr nc, $+3 ;after this, HL holds a pointer the the character we need to display
inc h
;$$ ;this is just a comment for clarity on the jump, could have used a label

call curOff ;destroys A not HL (this is an actual comment from this code :D )
ld a, (hl)
or a
jr z, justKidding ;the button pressed was in the correct range, it just wasn't a key we wanted

ld (de), a ;add it to the buffer
inc de ;increase the buffer pointer
inc b ;increase the counter for the bufer

bcall(_PutC) ;type the character and increase (curCol)

call cursorOn
jp typeLoop

justKidding:
call cursorOn
jp typeLoop

cursorOn:
res curOn, (iy + curFlags)
jr readyk
curOff:
set curOn, (iy + curFlags)
readyk:
ld a, 1 ;this is a clever little hack, you set the wrong cursor state
ld (curTime), a ;set the curTime to 1, and let an interrupt occur
ei ;since the OS decreases curTime by one every interrupt, it will
halt ;reach zero and the OS will flip the cursor over to the correct state
ret


charTable: ;these are the letters as they appear in order of scan code
.db $1A, "369", 0, 0, 0, 0 ;1A is neg
.db ".258", 0, 0, 0, 0
.db "0147", $1B ;1B is E

So after this is run, if it comes back with carry not set (NC) you will know that you should then parse the buffer for the floating point number. I don't think parsing will be that hard, so I left that up to you ;D If you totally understand this routine, you can rework it to use bcall(_getKey) which will allow for the user to press 2nd. But I don't see the point in this other than to prevent confusion with the E button.


As for part 2 of your post, I'll have to get to that another day. Right now I don't have the time. But, from a quick glance, you might want to check out bcall(_putS) and bcall(_vPutS). The reason is that every bcall is rather slow to call, so calling these single ones that display a whole string can speed things up.

(Where do you look them up? wikiTi and TI's TI-83 Plus System Routines (this link is to the page, you'll have to download the pdf))


Edit:

2)

Ok, here's a much faster version:
Code: [Select]

menu:

 LD HL,$0000
 LD (curRow),HL
 
 LD HL,menuA
 set textInverse,(IY+textFlags)
 bcall(_putS)
 res textInverse,(IY+textFlags)
 
 LD de,$0207
 ld (penCol),de
 
 LD B,9
menuLoop:
 ld a,(penRow) ;like chickendude said
 add a,6 ;but this didn't cause the slowness
 ld (penRow),a
 ld a, 2
 ld (penCol), a

 bcall(_vPutS)
 djnz menuLoop

 bcall(_getKey) ;delay
 ret


menuA:
 .db "     TITLE      ",0
 .db "1. Item A",0
 .db "2. Item A",0
 .db "3. Item A",0
 .db "4. Item A",0
 .db "5. Item A",0
 .db "6. Item A",0
 .db "7. Item A",0
 .db "8. Item A",0
 .db "9. EXIT",0

The reason that your routine was so slow was that you were displaying all of those spaces. Never display spaces in small font like that because it's slow as balls. Also, whenever you run bcall(_vPutS) or bcall(_putS), HL returns pointing to the byte after the zero. This allows you to display all the strings one after another.


If you want even more speed, there is an option. First you "set textWrite, (iy + sgrFlags)". This will allow you to write the small font directly to plotSScreen without writing it to the screen. After it's all there, you can then do bcall(_grBufCpy) (or your own version) to write it to the screen. This is faster because writing to the screen is slow so doing it all at once is faster. The only trouble, (and why I didn't do it to yours), is that it doesn't affect the large font. To get that to work, you'd have to "set fracDrawLFont, (iy + fontFlags)" and then use bcall(_vPutS) to write it to the buffer. But that's a little messy (though not really).

237
ASM / Re: How prolific are you?
« on: September 07, 2012, 05:50:42 pm »
I'm glad to see someone knows DOS.

Also, you beat me by like 6x.

238
TI Z80 / Re: The Impossible Game
« on: September 07, 2012, 05:48:23 pm »
it's possible, and it should be easy enough to manage in lua, even if you add in all the fancy effects =)
thepenguin, do you have the level data for these in a readable format so it would ease the process?

Yeppers

Spoiler For all the level data lolz:

;###############################################
;upper two bits
;0 = wait
;1 = command
;2 = block
;3 = spike

;objects
;ttthhhhh
;
;100 = spike
;101 = spikex
;110 = block
;
;hhhhh = height in whole blocks

;commands
;01cccccc
;
;0 = winning!
;1 = toggle dark
;2 = flip screen
;3 = invert screen
;4 = falling
;5 = rising
;6 = mirror

cWinning    equ   0
cToggleDark   equ   1
cFlipScreen   equ   2
cInvertScreen   equ   3
cFalling   equ   4
cRising      equ   5
cMirrorScreen   equ   6

#define   wait(xxx)   .db xxx
#define command(xxx)   .db $40 + xxx
#define commandWait(xxx, dl)   .db $40 + xxx, dl

#define blockSingle(h1)   .db $C0 + h1
#define block(h1,dl)   .db $C0 + h1, dl

#define spikeSingle(h1)   .db $80 + h1
#define spike(h1,dl)   .db $80 + h1, dl
#define double(h1,dl)   .db $80 + h1, 3, $80 + h1, dl
#define triple(h1,dl)   .db $80 + h1, 3, $80 + h1, 3, $80 + h1, dl
#define quad(h1,dl)   .db $80 + h1, 3, $80 + h1, 3, $80 + h1, 3, $80 + h1, dl
#define   quint(h1,dl)   .db $80 + h1, 3, $80 + h1, 3, $80 + h1, 3, $80 + h1, 3, $80 + h1, dl

#define spikexSingle(h1)   .db $A0 + h1
#define spikex(h1,dl)   .db $A0 + h1, dl
#define doublex(h1,dl)   .db $A0 + h1, 3, $A0 + h1, dl
#define triplex(h1,dl)   .db $A0 + h1, 3, $A0 + h1, 3, $A0 + h1, dl
#define quadx(h1,dl)   .db $A0 + h1, 3, $A0 + h1, 3, $A0 + h1, 3, $A0 + h1, dl


;jump distances
;+2   3*3      9
;+1   4*3      12
;0   4*3+2      14
;-1   5*3      15
;-2   5*3+1      16

;fall distances
;-1   3*3      9
      

fireAuraHax:
   command(cFlipScreen)
   command(cMirrorScreen)
   command(cRising)
   command(cFalling)


fireAura:
   spike(0, 17*3)
   double(0, 16*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3 + 1)
   blockSingle(0)
   commandWait(cToggleDark, 17*3)
   double(0, 18*3)
   spike(0, 8*3)
   double(0, 5*3)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 8*3)
   spike(0, 18*3)
   spike(0, 16*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 2*3 + 1)
   blockSingle(1)
   spike(2, 2*3 + 1)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 5*3)
   spike(0, 12*3)
   spike(0, 10*3)
   spike(0, 7*3)
   spike(0, 9*3)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   blockSingle(4)
   spike(5, 2*3 + 1)
   block(5, 1*3)
   block(5, 1*3)
   block(5, 1*3)
   block(5, 1*3)
   blockSingle(5)
   spike(6, 1*3)
   block(5, 1*3)
   block(5, 1*3)
   block(5, 1*3)
   block(5, 1*3)
   blockSingle(5)
   spike(6, 1*3)
   block(5, 1*3)
   block(5, 1*3)
   block(5, 3*3)
   block(4, 1*3)
   blockSingle(6)
   spike(7, 2*3)
   block(3, 3*3)
   block(2, 3*3)
   block(1, 3*3)
   block(0, 4*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   block(6, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 3*3)
   block(11, 3*3 + 2)
   block(12, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   block(12, 5*3)
   block(11, 5*3)
   block(11, 1*3)
   block(11, 1*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 5*3)
   block(13, 3*3)
   block(12, 1*3)
   block(12, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   block(12, 1*3)
   block(12, 1*3)
   block(12, 1*3)
   block(12, 1*3)
   block(12, 1*3)
   blockSingle(11)
   spikex(12, 1*3)
   blockSingle(11)
   spikex(12, 1*3)
   blockSingle(11)
   spikex(12, 1*3)
   block(11, 1*3)
   block(11, 1*3)
   block(11, 1*3)
   block(11, 1*3)
   block(11, 1*3)
   block(11, 1*3)
   block(11, 5*3)
   block(10, 5*3)
   block(9, 5*3)
   block(8, 5*3)
   block(7, 5*3)
   block(6, 5*3)
   block(5, 5*3)
   block(4, 5*3)
   block(3, 5*3)
   block(2, 5*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 5*3)
   spike(0, 7*3)
   double(0, 9*3)
   triple(0, 10*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 3*3)
   block(3, 4*3)
   block(4, 4*3 + 2)
   block(4, 3*3)
   block(3, 4*3)
   block(4, 5*3)
   block(3, 4*3)
   block(4, 3*3)
   block(3, 4*3)
   block(4, 4*3 + 2)
   block(4, 4*3 + 2)
   block(4, 4*3 + 2)
   block(4, 5*3)
   block(3, 4*3)
   block(4, 3*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 3*3)
   block(4, 1*3)
   blockSingle(6)
   spike(7, 2*3)
   block(3, 3*3)
   block(2, 5*3 + 1)
   block(0, 4*3 + 2)
   block(0, 4*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 2*3)
   blockSingle(3)
   spike(4, 2*3)
   block(4, 1*3)
   commandWait(cToggleDark, 3*3)
   spike(0, 6*3)
   spike(0, 8*3)
   triple(0, 7*3)
   double(0, 6*3)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   block(6, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   block(18, 4*3)
   block(19, 4*3)
   block(20, 4*3)
   block(21, 4*3)
   block(22, 4*3)
   block(23, 3*3 + 2)
   blockSingle(24)
   spike(25, 3*3)
   block(5, 1*3)
   block(5, 6*3)
   commandWait(cToggleDark, 3*3)
   spike(0, 5*3)
   spike(0, 11*3)
   spike(0, 7*3)
   double(0, 4*3)
   doublex(0, 1*3)
   block(0, 1*3)
   doublex(0, 7*3)
   block(0, 1*3)
   quadx(0, 9*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   blockSingle(2)
   spike(3, 3*3)
   block(3, 3*3)
   block(2, 5*3)
   block(1, 3*3)
   blockSingle(0)
   commandWait(cToggleDark, 1*3)
   quadx(0, 7*3)
   spike(0, 10*3)
   triple(0, 2*3 + 2)
   triple(0, 5*3 + 2)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   blockSingle(3)
   blockSingle(0)
   spike(1, 4*3)
   blockSingle(4)
   blockSingle(1)
   spike(2, 4*3)
   blockSingle(5)
   blockSingle(2)
   spike(3, 4*3)
   blockSingle(6)
   blockSingle(3)
   spike(4, 4*3)
   blockSingle(7)
   blockSingle(4)
   spike(5, 4*3)
   blockSingle(8)
   blockSingle(5)
   spike(6, 3*3)
   blockSingle(7)
   blockSingle(10)
   spike(11, 3*3)
   blockSingle(6)
   blockSingle(11)
   spike(12, 5*3)
   blockSingle(5)
   blockSingle(9)
   spike(10, 5*3)
   blockSingle(4)
   blockSingle(8)
   spike(9, 4*3 + 2)
   blockSingle(4)
   blockSingle(8)
   spike(9, 4*3)
   blockSingle(5)
   blockSingle(2)
   spike(3, 4*3)
   blockSingle(6)
   blockSingle(3)
   spike(4, 4*3)
   blockSingle(7)
   blockSingle(4)
   spike(5, 4*3)
   blockSingle(8)
   blockSingle(5)
   spike(6, 4*3)
   blockSingle(9)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(9)
   spike(10, 1*3)
   blockSingle(8)
   spike(9, 1*3)
   blockSingle(7)
   spike(8, 1*3)
   blockSingle(5)
   spike(6, 1*3)
   blockSingle(3)
   spike(4, 1*3)
   blockSingle(0)
   spikeSingle(1)
   commandWait(cToggleDark, 9*3)
   spike(0, 6*3)
   double(0, 7*3)
   triple(0, 7*3)
   double(0, 8*3)
   spike(0, 6*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   blockSingle(6)
   commandWait(cWinning, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   blockSingle(18)
   commandWait(cToggleDark, 16*3 + 2)

xboxLevelHax:
   command(cFlipScreen)
   command(cMirrorScreen)
   command(cRising)
   command(cFalling)

xboxLevel:
   spike(0, 9*3)
   spike(0, 8*3)
   double(0, 15*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   blockSingle(1)
   commandWait(cToggleDark, 8*3)
   double(0, 14*3)
   spike(0, 16*3)
   spike(0, 8*3)
   spike(0, 5*3)
   double(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 8*3)
   spike(0, 17*3)
   spike(0, 10*3)
   block(0, 1*3)
   triplex(0, 7*3)
   spikex(0, 1*3)
   block(0, 1*3 + 1)
   spikex(0, 6*3)
   spike(0, 18*3)
   block(0, 4*3)
   block(1, 1*3)
   blockSingle(1)
   spike(2, 5*3)
   double(0, 6*3)
   spike(0, 9*3)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 4*3)
   block(4, 5*3)
   block(3, 5*3)
   block(2, 3*3)
   block(1, 1*3)
   blockSingle(3)
   spike(4, 2*3)
   block(0, 4*3 + 2)
   block(0, 4*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 3*3)
   block(4, 1*3)
   block(6, 2*3)
   block(3, 2*3)
   block(7, 1*3)
   block(2, 3*3)
   blockSingle(1)
   block(8, 3*3)
   block(0, 1*3)
   spikexSingle(0)
   block(9, 1*3)
   triplex(0, 1*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   block(18, 4*3)
   block(19, 4*3)
   block(20, 4*3)
   block(21, 5*3 + 1)
   block(20, 1*3)
   blockSingle(20)
   spike(21, 1*3)
   blockSingle(20)
   spike(21, 3*3)
   block(19, 5*3)
   block(18, 5*3)
   block(17, 1*3)
   blockSingle(17)
   spike(18, 4*3)
   block(16, 5*3)
   block(15, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   blockSingle(15)
   spike(16, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   blockSingle(15)
   spike(16, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   block(15, 1*3)
   blockSingle(15)
   spike(16, 3*3)
   block(14, 5*3)
   block(13, 5*3)
   block(12, 5*3)
   block(11, 5*3)
   block(10, 5*3)
   block(9, 5*3)
   block(8, 5*3)
   block(7, 5*3)
   block(6, 5*3)
   block(5, 5*3)
   block(4, 5*3)
   block(3, 5*3)
   block(2, 5*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 6*3)
   spike(0, 7*3)
   triple(0, 9*3)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 6*3)
   block(1, 3*3)
   commandWait(cToggleDark, 4*3)
   spike(0, 6*3)
   spike(0, 6*3)
   spike(0, 5*3)
   spike(0, 6*3)
   double(0, 4*3)
   double(0, 7*3)
   triple(0, 6*3)
   block(0, 1*3)
   quadx(0, 8*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   block(6, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 3*3)
   block(8, 4*3 + 2)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 6*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 3*3)
   block(15, 4*3)
   block(16, 3*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   block(18, 5*3)
   block(17, 4*3)
   block(18, 4*3)
   block(19, 4*3)
   block(20, 8*3)
   block(2, 1*3)
   block(2, 3*3)
   commandWait(cToggleDark, 9*3)
   double(0, 8*3)
   double(0, 4*3)
   double(0, 7*3)
   double(0, 4*3)
   double(0, 9*3)
   triple(0, 2*3 + 2)
   triple(0, 4*3)
   spike(0, 4*3)
   double(0, 1*3)
   block(0, 1*3)
   commandWait(cToggleDark, 4*3)
   block(1, 3*3)
   blockSingle(0)
   commandWait(cToggleDark, 1*3)
   quadx(0, 4*3)
   spike(0, 5*3)
   spike(0, 10*3)
   spike(0, 5*3)
   spike(0, 5*3)
   spike(0, 12*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 9*3)
   spike(0, 7*3)
   double(0, 7*3)
   triple(0, 7*3)
   double(0, 7*3)
   spike(0, 11*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   blockSingle(6)
   commandWait(cWinning, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   blockSingle(18)
   commandWait(cToggleDark, 16*3 + 2)

chaozFantasy:
   spike(0, 5*3 + 1)
   spike(0, 6*3 + 2)
   double(0, 6*3)
   spike(0, 6*3)
   block(0, 1*3)
   block(0, 1*3)
   doublex(0, 5*3)
   spike(0, 5*3)
   spike(0, 6*3 + 2)
   double(0, 6*3)
   spike(0, 4*3)
   double(0, 3*3 + 2)
   double(0, 4*3 + 2)
   spike(0, 5*3)
   spike(0, 6*3 + 2)
   double(0, 6*3)
   spike(0, 6*3)
   block(0, 1*3)
   triplex(0, 5*3)
   spike(0, 5*3 + 1)
   spike(0, 6*3 + 2)
   double(0, 8*3 + 1)
   spike(0, 4*3 + 1)
   spike(0, 1*3 + 1)
   spike(0, 6*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 1*3)
   blockSingle(0)
   spike(1, 1*3)
   blockSingle(0)
   spike(1, 2*3 + 2)
   block(0, 1*3 + 2)
   blockSingle(0)
   spike(1, 1*3)
   blockSingle(0)
   spike(1, 6*3 + 2)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 3*3)
   block(0, 4*3 + 2)
   block(0, 4*3 + 2)
   block(0, 4*3)
   block(1, 4*3)
   block(2, 1*3)
   block(2, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(1)
   spikex(2, 2*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 4*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 4*3 + 2)
   block(2, 3*3)
   block(1, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 7*3 + 1)
   spike(0, 9*3 + 1)
   spike(0, 6*3)
   spike(0, 21*3)
   commandWait(cFlipScreen, 2*3)
   spike(0, 11*3 + 2)
   double(0, 13*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 5*3 + 2)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 3*3)
   blockSingle(0)
   commandWait(cToggleDark, 1*3)
   triplex(0, 6*3 + 2)
   double(0, 6*3)
   spike(0, 4*3 + 2)
   spike(0, 5*3 + 2)
   spike(0, 1*3 + 1)
   block(0, 2*3 + 1)
   spike(0, 2*3 + 1)
   block(0, 1*3 + 1)
   spike(0, 8*3 + 1)
   block(0, 1*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 1*3)
   block(1, 4*3)
   block(2, 1*3)
   block(2, 5*3)
   block(1, 1*3)
   block(1, 4*3)
   block(2, 1*3)
   block(2, 3*3)
   block(1, 1*3)
   block(1, 4*3 + 2)
   block(1, 1*3)
   blockSingle(1)
   commandWait(cToggleDark, 1*3)
   quad(0, 6*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 5*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 4*3 + 2)
   block(2, 3*3)
   block(1, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 3*3)
   blockSingle(0)
   commandWait(cToggleDark, 1*3)
   block(0, 1*3)
   block(0, 1*3)
   quadx(0, 2*3 + 2)
   triplex(0, 8*3 + 2)
   spike(0, 6*3)
   spike(0, 21*3)
   commandWait(cFlipScreen, 3*3)
   spike(0, 3*3 + 1)
   spike(0, 8*3)
   block(0, 1*3)
   block(0, 1*3)
   blockSingle(0)
   spike(1, 1*3)
   commandWait(cToggleDark, 2*3)
   block(1, 4*3 + 2)
   block(1, 1*3 + 1)
   commandWait(cToggleDark, 3*3 + 1)
   spike(0, 1*3 + 2)
   block(1, 10*3)
   spike(0, 9*3 + 1)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 1*3)
   block(1, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   block(1, 3*3)
   blockSingle(0)
   commandWait(cToggleDark, 1*3)
   triplex(0, 9*3 + 1)
   double(0, 8*3 + 1)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 3*3)
   block(0, 4*3 + 2)
   blockSingle(0)
   commandWait(cToggleDark, 5*3)
   triple(0, 8*3)
   spike(0, 21*3)
   wait(2*3 + 1)
   commandWait(cFlipScreen, 4*3)
   spike(0, 9*3 + 1)
   double(0, 8*3 + 1)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 8*3 + 1)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3 + 2)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 1*3)
   block(2, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   block(2, 3*3)
   block(1, 4*3 + 2)
   block(1, 4*3)
   block(2, 4*3 + 2)
   block(2, 5*3)
   block(1, 3*3)
   blockSingle(0)
   commandWait(cToggleDark, 4*3 + 1)
   spike(0, 2*3 + 1)
   block(1, 3*3)
   block(0, 1*3)
   triplex(0, 1*3)
   block(0, 21*3)
   commandWait(cFlipScreen, 10*3)
   spike(0, 9*3 + 1)
   spike(0, 16*3 + 2)
   triple(0, 7*3 + 1)
   spike(0, 7*3)
   double(0, 10*3 + 2)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   commandWait(cToggleDark, 2*3 + 1)
   triple(0, 7*3 + 1)
   spike(0, 1*3 + 1)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 4*3 + 2)
   block(1, 4*3)
   block(2, 3*3)
   block(1, 1*3)
   block(1, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   blockSingle(1)
   spike(2, 1*3)
   block(1, 5*3)
   blockSingle(0)
   commandWait(cToggleDark, 6*3 + 2)
   spike(0, 14*3 + 1)
   double(0, 11*3 + 1)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   blockSingle(6)
   commandWait(cWinning, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   blockSingle(18)
   commandWait(cToggleDark, 16*3 + 2)

heaven:
   spike(0, 7*3)
   spike(0, 9*3 + 1)
   spike(0, 9*3 + 1)
   spike(0, 9*3 + 1)
   spike(0, 8*3 + 1)
   spike(0, 10*3 + 2)
   spike(0, 8*3 + 2)
   block(0, 1*3)
   blockSingle(0)
   spike(1, 1*3)
   blockSingle(0)
   spike(1, 7*3 + 2)
   spike(0, 7*3 + 1)
   spike(0, 9*3 + 2)
   spike(0, 9*3 + 1)
   spike(0, 9*3 + 1)
   spike(0, 8*3 + 1)
   spike(0, 10*3 + 2)
   spike(0, 7*3)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   blockSingle(0)
   blockSingle(1)
   commandWait(cToggleDark, 1*3)
   triplex(0, 5*3 + 1)
   spike(0, 7*3)
   spike(0, 8*3 + 2)
   spike(0, 9*3 + 2)
   spike(0, 9*3 + 2)
   spike(0, 8*3 + 2)
   spike(0, 11*3)
   spike(0, 6*3)
   block(0, 3*3 + 2)
   blockSingle(1)
   spike(2, 4*3)
   spike(0, 6*3 + 1)
   spike(0, 6*3 + 1)
   double(0, 10*3)
   spike(0, 8*3)
   block(0, 1*3)
   blockSingle(0)
   spike(1, 1*3)
   blockSingle(0)
   spike(1, 1*3)
   block(0, 9*3 + 1)
   spike(0, 7*3)
   double(0, 3*3 + 1)
   double(0, 5*3 + 2)
   spike(0, 9*3 + 1)
   double(0, 16*3 + 2)
   commandWait(cInvertScreen, 21*3)
   commandWait(cFalling, 8*3 + 1)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   blockSingle(2)
   commandWait(cInvertScreen, 4*3)
   block(3, 4*3)
   block(4, 3*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 1*3)
   block(5, 1*3)
   block(5, 4*3)
   block(6, 5*3)
   block(5, 4*3 + 1)
   block(6, 1*3)
   block(6, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   block(6, 3*3)
   block(5, 4*3)
   block(6, 1*3)
   block(6, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3 + 1)
   block(6, 1*3 + 1)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3 + 1)
   block(6, 1*3 + 1)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   blockSingle(6)
   spike(7, 1*3)
   block(6, 3*3)
   block(5, 4*3)
   block(6, 4*3)
   block(7, 4*3)
   block(8, 2*3 + 2)
   block(7, 1*3)
   blockSingle(7)
   spike(8, 1*3)
   blockSingle(7)
   spike(8, 1*3)
   blockSingle(7)
   spike(8, 1*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 1*3)
   block(9, 1*3)
   blockSingle(9)
   spike(10, 1*3)
   blockSingle(9)
   spike(10, 1*3)
   blockSingle(9)
   spike(10, 1*3)
   block(9, 4*3)
   block(10, 1*3)
   block(10, 1*3)
   blockSingle(10)
   spike(11, 1*3)
   blockSingle(10)
   spike(11, 1*3)
   blockSingle(10)
   spike(11, 1*3)
   block(10, 4*3)
   block(11, 1*3)
   block(11, 1*3)
   blockSingle(11)
   spike(12, 1*3)
   blockSingle(11)
   spike(12, 1*3)
   blockSingle(11)
   spike(12, 1*3)
   block(11, 4*3)
   block(12, 3*3)
   block(11, 4*3)
   block(12, 5*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 1*3)
   block(14, 1*3)
   block(14, 1*3)
   blockSingle(14)
   spike(15, 1*3)
   blockSingle(14)
   spike(15, 1*3)
   block(14, 1*3)
   block(14, 1*3)
   blockSingle(14)
   spike(15, 4*3)
   block(13, 4*3)
   block(14, 3*3)
   block(13, 4*3)
   block(14, 3*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 3*3)
   block(14, 1*3)
   blockSingle(14)
   spike(15, 1*3)
   blockSingle(14)
   spike(15, 1*3)
   blockSingle(14)
   spike(15, 2*3)
   block(13, 1*3)
   blockSingle(13)
   spike(14, 1*3)
   blockSingle(13)
   spike(14, 1*3)
   blockSingle(13)
   spike(14, 2*3)
   block(12, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   blockSingle(12)
   spike(13, 1*3 + 1)
   block(12, 1*3 + 1)
   blockSingle(12)
   spike(13, 1*3)
   blockSingle(12)
   spike(13, 1*3)
   blockSingle(12)
   spike(13, 1*3 + 1)
   block(12, 3*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 2*3 + 1)
   blockSingle(16)
   spike(17, 2*3 + 1)
   block(16, 4*3)
   block(17, 2*3 + 1)
   blockSingle(17)
   spike(18, 2*3 + 1)
   block(17, 1*3)
   block(17, 1*3)
   block(17, 1*3)
   blockSingle(17)
   spike(18, 1*3)
   blockSingle(17)
   spike(18, 1*3)
   blockSingle(17)
   spike(18, 1*3)
   block(17, 4*3)
   block(18, 3*3)
   block(17, 1*3)
   blockSingle(17)
   spike(18, 1*3)
   blockSingle(17)
   spike(18, 2*3 + 2)
   block(17, 3*3)
   block(16, 4*3)
   block(17, 4*3)
   block(18, 3*3)
   block(17, 4*3)
   block(18, 4*3)
   block(19, 4*3)
   block(20, 4*3)
   block(21, 8*3 + 1)
   block(18, 1*3)
   blockSingle(17)
   commandWait(cToggleDark, 1*3)
   blockSingle(16)
   blockSingle(17)
   blockSingle(18)
   blockSingle(19)
   blockSingle(20)
   block(21, 1*3)
   block(17, 1*3)
   block(18, 7*3 + 2)
   command(cInvertScreen)
   command(cFalling)
   commandWait(cRising, 15*3)
   blockSingle(0)
   commandWait(cInvertScreen, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3 + 2)
   block(2, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 5*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 5*3)
   block(3, 4*3)
   block(4, 3*3)
   block(3, 4*3 + 2)
   block(3, 1*3)
   block(3, 1*3)
   blockSingle(3)
   spike(4, 1*3)
   blockSingle(3)
   spike(4, 1*3)
   blockSingle(3)
   spike(4, 1*3)
   block(3, 3*3)
   block(2, 4*3)
   block(3, 3*3)
   block(2, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   block(2, 4*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   blockSingle(2)
   spike(3, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   blockSingle(2)
   spike(3, 3*3)
   block(3, 1*3)
   block(3, 1*3)
   blockSingle(3)
   spike(4, 3*3)
   block(4, 1*3)
   block(4, 1*3)
   blockSingle(4)
   spike(5, 4*3)
   block(3, 2*3 + 1)
   blockSingle(3)
   spike(4, 2*3 + 1)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 3*3 + 1)
   block(4, 1*3)
   blockSingle(4)
   spike(5, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 1*3)
   blockSingle(4)
   spike(5, 1*3)
   block(4, 3*3)
   block(3, 4*3)
   block(4, 5*3)
   block(3, 3*3)
   block(2, 5*3)
   block(1, 2*3)
   commandWait(cToggleDark, 1*3)
   block(0, 1*3)
   quadx(0, 12*3 + 1)
   spike(0, 11*3)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 2*3 + 2)
   triple(0, 5*3)
   triple(0, 5*3)
   triple(0, 5*3)
   triple(0, 5*3)
   triple(0, 5*3)
   triple(0, 10*3 + 1)
   blockSingle(1)
   spike(2, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(2, 1*3)
   block(3, 1*3)
   spikeSingle(0)
   block(4, 1*3)
   blockSingle(0)
   block(4, 1*3)
   blockSingle(0)
   block(4, 1*3)
   blockSingle(0)
   block(3, 1*3)
   blockSingle(0)
   block(2, 1*3)
   blockSingle(0)
   block(3, 1*3)
   blockSingle(0)
   block(4, 1*3)
   blockSingle(0)
   spikeSingle(1)
   block(4, 1*3)
   blockSingle(0)
   block(4, 1*3)
   blockSingle(0)
   block(4, 1*3)
   blockSingle(0)
   block(4, 1*3)
   blockSingle(0)
   block(3, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 1*3)
   block(1, 1*3)
   block(1, 1*3)
   block(1, 7*3 + 1)
   spike(0, 5*3)
   double(0, 4*3 + 2)
   triple(0, 4*3 + 2)
   double(0, 4*3 + 2)
   spike(0, 12*3 + 2)
   command(cRising)
   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   blockSingle(6)
   commandWait(cWinning, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   blockSingle(18)
   

newLevel:
   spike(0, 5*3)
   spike(0, 7*3)
   blockSingle(0)
   commandWait(cToggleDark, 4*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 3*3)
   block(2, 1*3)
   spikeSingle(5)   ;you have to block, else a shortcut is present
   block(4, 2*3)
   block(1, 3*3)
   block(3, 4*3+1)
   block(4, 4*3)
   block(5, 5*3)
   block(4, 1*3)
   spikeSingle(7)   ;again block is necessary
   block(6, 2*3)
   block(3, 3*3)
   block(2, 3*3+1)
   block(4, 3*3)
   block(6, 3*3)
   block(8, 1*3)
   block(8, 1*3)
   block(8, 1*3)
   spikeSingle(9)
   block(8, 1*3)
   spikeSingle(9)
   block(8, 1*3)
   block(8, 1*3)
   block(8, 1*3)
   spikeSingle(9)
   block(8, 1*3)
   spikeSingle(9)
   block(8, 1*3)
   block(8, 1*3)
   block(8, 3*3+2)
   block(10, 3*3)
   block(12, 3*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 1*3)
   block(13, 1*3)
   block(13, 4*3)
   spike(13)
   block(12, 1*3)
   block(12, 3*3+1)
   block(14, 3*3)
   block(13, 4*3+2)
   block(13, 4*3)
   block(14, 3*3)
   block(16, 3*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 3*3)
   block(19, 5*3)
   block(18, 3*3)
   block(20, 3*3)
   block(22, 2*3)
   commandWait(cToggleDark, 11*3)
   commandWait(cInvertScreen, 7*3)
   command(cMirrorScreen)
   commandWait(cInvertScreen, 2*3)
;newLevel:

   blockSingle(1)
   commandWait(cToggleDark, 3*3)
   block(3, 3*3)
   block(5, 3*1)
   block(5, 3*3)
   block(7, 3*3)
   block(9, 3*3)
   block(11, 3*1)
   block(11, 5*3)
   block(10, 3*3)
   block(9, 5*3)
   block(8, 1*3)
   block(8, 1*3)
   block(8, 1*3)
   block(8, 2*3)

   spikeSingle(6)
   block(5, 1*3)
   spikeSingle(6)
   block(5, 1*3+1)
   block(5, 1*3+1)
   spikexSingle(6)
   block(5, 1*3)
   spikexSingle(6)
   block(5, 2)

   spikexSingle(4)
   block(3, 1*3)
   spikexSingle(4)
   block(3, 1*3+1)
   block(3, 1*3+1)
   spikexSingle(4)
   block(3, 1*3)
   spikexSingle(4)
   block(3, 2)

   spikexSingle(2)
   block(1, 1*3)
   spikexSingle(2)
   block(1, 1*3+1)
   block(1, 1*3+1)
   spikexSingle(2)
   block(1, 1*3)
   spikexSingle(2)
   command(cToggleDark)
   block(1, 8*3)


   blockSingle(0)
   commandWait(cToggleDark, 3*3)
   block(2, 2)
   spikeSingle(3)
   block(2, 1*3)
   spikeSingle(3)
   block(2, 1*3)
   spikeSingle(3)
   block(2, 1*3+1)
   block(2, 1*3+1)
   spikeSingle(3)
   block(2, 1*3)
   spikeSingle(3)
   block(2, 1*3)
   spikeSingle(3)
   block(2, 1*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 3*3+1)
   block(6, 2*3+2)
   block(5, 1*3+1)
   spikeSingle(6)
   block(5, 1*3)
   spikeSingle(6)
   block(5, 1*3)
   spikeSingle(6)
   block(5, 1*3+1)
   block(5, 3*3)
   block(4, 1*3)
   spikeSingle(7)
   block(6, 2*3)
   block(3, 3*3)
   block(2, 3*3)
   block(1, 4*3)
   commandWait(cToggleDark, 12*3)
   


   block(0, 3*3)
   block(2, 3*1)
   spikeSingle(3)
   block(2, 3*1)
   spikeSingle(3)
   block(2, 3*1)
   spikeSingle(3)
   block(2, 3*1
   spikeSingle(3)
   block(2, 5*3)
   blockSingle(1)
   commandWait(cToggleDark, 3*3)
   block(3, 3*3)
   blockSingle(2)
   block(1, 1*3)
   spikexSingle(2)
   block(1, 1*3)
   spikexSingle(2)      
   block(1, 1*3)
   spikexSingle(2)
   block(1, 2)      ;this cuts in to prevent bouncing
   block(1, 1)      ;off the spike
   spikex(2, 2*3)      
   block(0, 4*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 3*3)
   block(1, 4*3+2)
   block(1, 4*3+2)
   block(1, 1*3+1)
   spikeSingle(2)
   block(1, 1*3)
   spikeSingle(2)
   block(1, 1*3)
   spikeSingle(2)
   block(1, 1*3+1)
   block(1, 1*3+1)
   spikeSingle(2)
   block(1, 1*3)
   spikeSingle(2)
   block(1, 1*3)
   spikeSingle(2)
   block(1, 1*3+1)
   block(1, 3*3)
   block(3, 3*3)
   block(5, 3*3)
   block(7, 3*3)
   block(9, 3*3)
   block(11, 3*3)
   block(13, 3*3)
   block(15, 1*3)
   
   commandWait(cToggleDark, 11*3)
   commandWait(cInvertScreen, 7*3)
   command(cFlipScreen)
   commandWait(cInvertScreen, 2*3)

   triple(0, 5*3)

   blockSingle(1)
   commandWait(cToggleDark, 3*3)
   block(3, 3*3)
   block(5, 3*3)
   block(4, 1*3)
   block(4, 1*3)
   spikeSingle(5)
   block(4, 2*3)
   spikeSingle(5)
   block(4, 1*3)
   block(4, 4*3 + 1)
   block(5, 4*3 + 1)
   block(6, 3*3)
   block(8, 3*3)
   block(10, 3*3)
   block(12, 1*3 + 2)
   spikeSingle(13)
   block(12, 3*3)
   block(12, 3*3)
   block(14, 3*3)
   block(13, 3*3)
   block(12, 5*3)
   block(11, 5*3)
   block(10, 3*3)
   block(9, 5*3)
   block(8, 1*3)
   block(8, 1*3)
   spikeSingle(9)
   block(8, 1*3)
   block(8, 1*3)
   block(8, 4*3)
   block(9, 3*3)
   block(8, 3*3)
   block(10, 3*3)
   block(9, 3*3)
   block(11, 3*3)
   block(10, 3*3)
   block(12, 3*3)
   block(11, 3*3)
   block(13, 3*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 1*3)
   block(15, 1*3)
   spikeSingle(16)
   block(15, 1*3)
   spikeSingle(16)
   block(15, 3*3+2)
   block(14, 5*3)
   block(13, 1*3)
   block(13, 1*3)
   spikeSingle(14)
   block(13, 4*3+2)
   block(11, 4*3+2)
   block(11, 5*3)
   block(10, 5*3)
   block(9, 3*3)
   block(8, 5*3)
   block(7, 3*3)
   block(9, 3*3)
   block(8, 3*3)
   block(10, 3*3)
   block(9, 3*3)
   block(11, 5*3)
   block(10, 3*3)
   block(12, 3*3)
   block(11, 3*3)
   block(13, 3*3)
   block(12, 3*3)
   block(14, 5*3)
   block(13, 3*3)
   block(15, 3*3)
   block(14, 3*3)
   block(16, 5*3)
   block(15, 3*3)
   block(17, 5*3)
   block(16, 3*3)
   block(18, 1*3)
   block(18, 1*3)
   spikeSingle(19)
   block(18, 1*3)
   spikeSingle(19)
   block(18, 1*3)
   spikeSingle(19)
   block(18, 1*3)
   commandWait(cToggleDark, 13*3)


   commandWait(cInvertScreen, 5*3)

   command(cMirrorScreen)
   commandWait(cInvertScreen, 2*3)


   double(0, 4*3)

   triple(0, 2*3+2)
   triple(0, 2*3+2)
   triple(0, 2*3+2)
   triple(0, 8*3)
   block(1, 3*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   spikeSingle(4)
   block(3, 1*3)
   spikeSingle(4)
   block(3, 1*3)
   spikeSingle(4)
   block(3, 1*3)
   block(3, 2)
   quint(0, 8*3)

   blockSingle(0)
   commandWait(cToggleDark, 3*3)
   block(2, 3*3)
   block(4, 3*3)
   block(6, 3*3)
   block(5, 4*3)
   block(6, 3*3)
   block(5, 4*3)
   block(6, 5*3)
   block(5, 4*3)
   block(6, 3*3+1)
   block(4, 3*3)
   block(6, 5*3+1)
   block(4, 3*3)
   block(6, 3*3+1)
   block(4, 1*3)
   spikeSingle(7)
   block(6, 2*3)
   block(3, 3*3+1)
   block(2, 3*3+1)
   block(4, 3*3)
   block(3, 3*3)
   block(5, 3*3)
   block(4, 3*3)
   block(6, 3*3)
   block(8, 3*3)
   block(7, 3*3)
   block(9, 5*3+1)
   block(7, 5*3+1)
   block(5, 5*3+1)
   block(3, 1*3)
   spikeSingle(6)
   block(5, 2*3)
   block(2, 3*3)
   block(1, 3*3)
   command(cToggleDark)
   block(0, 8*3)


   blockSingle(1)
   commandWait(cToggleDark, 3*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 1*3)
   block(3, 4*3)
   block(0, 3*3)
   block(2, 3*3)
   block(4, 3*3)
   block(6, 3*3)
   block(8, 3*3)
   block(10, 3*3)
   block(12, 3*3)
   block(14, 3*3)
   block(16, 3*3)
   block(18, 3*3)
   block(20, 1*3)
   spikeSingle(21)
   spike(24, 1*3)
   spikeSingle(21)
   spike(24, 1*3)
   spikeSingle(20)
   spikeSingle(19)
   spike(24, 1*3)
   spikeSingle(18)
   spikeSingle(17)
   spikeSingle(16)
   spike(23, 1*3)
   spikeSingle(22)
   spikeSingle(15)
   spikeSingle(14)
   spikeSingle(13)
   spikeSingle(12)
   spike(21, 1*3)
   spikeSingle(20)
   spikeSingle(11)
   spikeSingle(10)
   spikeSingle(9)
   spikeSingle(8)
   spike(19, 1*3)
   spikeSingle(18)
   spikeSingle(17)
   spikeSingle(16)
   blockSingle(7)
   spike(15, 1*3)
   spikeSingle(14)
   spikeSingle(13)
   spikeSingle(12)
   spikeSingle(11)
   spike(10, 2*3)
   
   block(6, 3*3)
   command(cInvertScreen)
   block(5, 3*3)
   block(4, 3*3)
   command(cFlipScreen)
   command(cInvertScreen)
   block(3, 3*3)
   block(2, 3*3)
   block(1, 3*3)
   command(cToggleDark)
   block(0, 10*3)


;newLevel:
   blockSingle(1)
   commandWait(cToggleDark, 3*3+1)
   block(0, 3*3)
   block(2, 3*3)
   block(4, 3*3)
   block(6, 1*3)
   block(6, 5*3)
   spikeSingle(5)
   block(4, 1*3)
   block(4, 1*3)
   block(4, 5*3)
   spikeSingle(3)
   block(2, 1*3)
   block(2, 1*3)
   block(2, 5*3)
   spikeSingle(1)
   block(0, 1*3)
   block(0, 1*3)
   block(0, 3*3)
   block(2, 3*3)
   block(1, 3*3)
   block(3, 3*3)
   block(2, 3*3)
   block(4, 5*3)
   block(3, 3*3)
   block(2, 3*3)
   block(4, 3*3)
   block(6, 5*3+2)
   block(4, 5*3)
   block(3, 3*3)
   block(2, 4*3+2)
   block(2, 5*3)
   block(1, 3*3)
   command(cToggleDark)
   block(0, 8*3)

   triple(0, 8*3)

   block(0, 1*3)
   commandWait(cToggleDark, 3*3)
   block(1, 4*3)
   block(2, 4*3)
   block(3, 4*3)
   block(4, 4*3)
   block(5, 4*3)
   blockSingle(6)
   commandWait(cWinning, 4*3)
   block(7, 4*3)
   block(8, 4*3)
   block(9, 4*3)
   block(10, 4*3)
   block(11, 4*3)
   block(12, 4*3)
   block(13, 4*3)
   block(14, 4*3)
   block(15, 4*3)
   block(16, 4*3)
   block(17, 4*3)
   blockSingle(18)





   wait(63)
   wait(63)
   wait(63)
   wait(63)
   wait(63)




239
TI Z80 / Re: The Impossible Game
« on: September 07, 2012, 12:10:50 am »
Is there a ti nspire version for this?

This game runs on the 84+ emulation on the Nspire (which was discontinued somewhere in the OS 2.x range).

But for the actual question, no. I don't have an Nspire and no one else has bothered to port this.

240
ASM / Re: ASM Command of the Week
« on: September 05, 2012, 01:51:46 pm »
Hmm, so if I am reading your post properly, the first code sends 8 bytes to port $A0, and the second writes all the bytes being received, to HL, and then returns the number of bytes that were received? Is USB control that easy?

The one that reads all of the data is that easy. The driver basically says, "I got some data for you" and you read it all.

The output one is super simplified, but this small section of code does appear in most data transfer code.


USB is super hard.

Pages: 1 ... 14 15 [16] 17 18 ... 108