Author Topic: TFE - Resurrection (TI-File Editor)  (Read 26474 times)

0 Members and 2 Guests are viewing this topic.

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: TFE - Resurrection (TI-File Editor)
« Reply #60 on: September 19, 2010, 08:58:48 pm »
That just means I messed up when modding my de-tokenizing routine to allow for two different types of tokens, joy, now thats like 3 major bugs... Ok, I'll try and fix it by tonight or tomorrow night...
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: TFE - Resurrection (TI-File Editor)
« Reply #61 on: September 20, 2010, 02:39:31 am »
Ok, I fixed Axe recognition, (It shows in the title bar if it's axe or not now =P) and I *think* got rid of the messed up detokenizing, which was majorly linked to axe recognition. Yes, I still need to fix the single if highlighting in regular programs... Hmm, I don't even remember, were there any other bugs I was supposed to be fixing? =P
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: TFE - Resurrection (TI-File Editor)
« Reply #62 on: September 20, 2010, 02:53:06 am »
Hmm, ok it seems that that "o" is one the couple BBxx tokens I didn't add... sorry I misspoke. the "a" is definitely added there as an "a" tho, I don't know why it would be showing "n" (the letters in quotes are the special symbols im to lazy to find to copypasta :P)
@LordConiupiter Sure, but that code might not really work too well (be easy to work with), If you want, I could wrap it  into an easy function that you can just copy in if you want...
well, if it's not too much trouble, I really would appreciate it!
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: TFE - Resurrection (TI-File Editor)
« Reply #63 on: September 20, 2010, 03:11:24 am »
Spoiler For Not too much trouble ;D:
Code: [Select]
  Public Function GenerateFile(ByVal File_Bytes() As Byte, ByVal File_Name As String, ByVal File_Comment As String)
        Dim FileBytes(1048576) As Byte
        Dim FileBytesCounter1 As Integer = File_Bytes.Length
        Dim FileComment = File_Comment
        Dim FileName = File_Name
        '**TI83F*
        FileBytes(0) = 42
        FileBytes(1) = 42
        FileBytes(2) = 84
        FileBytes(3) = 73
        FileBytes(4) = 56
        FileBytes(5) = 51
        FileBytes(6) = 70
        FileBytes(7) = 42
        '1A,0A,00
        FileBytes(8) = 26
        FileBytes(9) = 10
        FileBytes(10) = 0
        'Comment
        FileComment = FileComment.PadRight(42, ChrW(0))
        For x As Integer = 0 To 41
            FileBytes(x + 11) = AscW(FileComment.Chars(x))
        Next
        'Data Size
        If FileBytesCounter1 + 19 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1 + 19, 4)
            FileBytes(54) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(53) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(54) = 0
            FileBytes(53) = FileBytesCounter1 + 19
        End If
        'Random Flag (either B or D)
        FileBytes(55) = 13
        FileBytes(56) = 0
        'Variable Size
        If FileBytesCounter1 + 2 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1 + 2, 4)
            FileBytes(58) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(57) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(58) = 0
            FileBytes(57) = FileBytesCounter1 + 2
        End If
        'Type ID
        FileBytes(59) = 5
        'Name
        FileName = FileName.PadRight(8, ChrW(0))
        For x As Integer = 0 To 7
            FileBytes(60 + x) = AscW(FileName.Chars(x))
        Next
        'Version
        FileBytes(68) = 0
        'Archived
        FileBytes(69) = 0
        'Variable Size Again
        If FileBytesCounter1 + 2 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1 + 2, 4)
            FileBytes(71) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(70) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(71) = 0
            FileBytes(70) = FileBytesCounter1 + 2
        End If
        'Total Token Count
        If FileBytesCounter1 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1, 4)
            FileBytes(73) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(72) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(73) = 0
            FileBytes(72) = FileBytesCounter1
        End If
        'Totals data
        Dim Counter = 0
        For x As Integer = 0 To FileBytesCounter1 + 19
            Counter += FileBytes(x + 55)
        Next
        'Lower 16 bits of data totalled together
        If Hex(Counter).Length > 4 Then Counter = cInteger(Mid(cHex(Counter, 4), 1, 4))
        If Counter > 255 Then
            FileBytes(FileBytesCounter1 + 75) = cInteger(Mid(cHex(Counter, 4), 1, 2))
            FileBytes(FileBytesCounter1 + 74) = cInteger(Mid(cHex(Counter, 4), 3, 2))
        Else
            FileBytes(FileBytesCounter1 + 75) = 0
            FileBytes(FileBytesCounter1 + 74) = Counter
        End If
        Dim FinalBytes(FileBytesCounter1 + 75) As Byte
        For x As Integer = 0 To FileBytesCounter1 + 75
            FinalBytes(x) = FileBytes(x)
        Next
        Return FinalBytes
    End Function

    Shared Function cHex(ByVal IntValue As Integer, ByVal Length As Integer) As String
        Dim Int_Length As Integer = Int(Math.Log10(IntValue) / Math.Log10(16)) + 1
        Dim Temp_Value As Integer
        Dim Hex_String As String = ""
        For X As Integer = Length - 1 To 0 Step -1
            Temp_Value = Int(IntValue / (16 ^ X))
            Hex_String += Mid("0123456789ABCDEF", Temp_Value + 1, 1)
            IntValue -= Temp_Value * (16 ^ X)
        Next
        Return Hex_String
    End Function

    Shared Function cInteger(ByVal HexString As String) As Integer
        Dim Int_Value As Integer
        For X As Integer = HexString.Length To 1 Step -1
            Int_Value += (InStr("0123456789ABCDEF", Mid(HexString, X, 1)) - 1) * (16 ^ (HexString.Length - X))
        Next
        Return Int_Value
    End Function
It takes an array of bytes which consists of the data you want put into the program, a string which is the eight or less on calc program name, and a string which is a... (either 40 or 42 i can't remember) or less file comment, which is mostly pointless, but can be set anyways...  :P
« Last Edit: September 20, 2010, 03:26:05 am by cooliojazz »
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

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: TFE - Resurrection (TI-File Editor)
« Reply #64 on: September 20, 2010, 03:54:43 am »
I like the code highlighting so far. I noticed a few issues, though (see screenie) D:

Also what's with the "the game" in the code? I lost :( (it wasn't even part of the code x.x)
« Last Edit: September 20, 2010, 03:55:35 am by DJ Omnimaga »

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: TFE - Resurrection (TI-File Editor)
« Reply #65 on: September 20, 2010, 11:12:42 am »
...Yes, I still need to fix the single if highlighting in regular programs...
Yes,  I know that's an issue =P
And... What?!?!? XD
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

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: TFE - Resurrection (TI-File Editor)
« Reply #66 on: September 20, 2010, 11:26:11 am »
Oh ok I wasn't too sure since a Repeat was involved in the code. But yeah check in the code where it says "If The Game". I never actually wrote that code. It appears in your editor for some reasons. Invalid/unrecognized token?

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: TFE - Resurrection (TI-File Editor)
« Reply #67 on: September 20, 2010, 11:28:24 am »
Oh ok I wasn't too sure since a Repeat was involved in the code. But yeah check in the code where it says "If The Game". I never actually wrote that code. It appears in your editor for some reasons. Invalid/unrecognized token?
Mission objective completed: easter egg found.

I guess...
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

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: TFE - Resurrection (TI-File Editor)
« Reply #68 on: September 20, 2010, 11:44:04 am »
Maybe it's an easter egg for when TFE cannot recognize a token in particular.

Or the program got corrupted. I'll redownload it later to see...
« Last Edit: September 20, 2010, 11:44:25 am by DJ Omnimaga »

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: TFE - Resurrection (TI-File Editor)
« Reply #69 on: September 20, 2010, 01:14:15 pm »
Umm, as far as I know, I never typed the words "the game" in any part of the program... x.x
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

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: TFE - Resurrection (TI-File Editor)
« Reply #70 on: September 20, 2010, 01:21:01 pm »
Ok I just discovered it was the same file I used when I tested TFE over a month ago, my bad x.x

I modified it a bit back then but I did not realize I saved it x.x. Sorry

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: TFE - Resurrection (TI-File Editor)
« Reply #71 on: September 20, 2010, 01:48:09 pm »
O, *Phew* that makes me feel a bit better, cause that was really strange... Hmm, that is a good idea for a future addition tho... O_o
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: TFE - Resurrection (TI-File Editor)
« Reply #72 on: September 20, 2010, 04:25:28 pm »
Spoiler For Not too much trouble ;D:
Code: [Select]
   Public Function GenerateFile(ByVal File_Bytes() As Byte, ByVal File_Name As String, ByVal File_Comment As String)
        Dim FileBytes(1048576) As Byte
        Dim FileBytesCounter1 As Integer = File_Bytes.Length
        Dim FileComment = File_Comment
        Dim FileName = File_Name
        '**TI83F*
        FileBytes(0) = 42
        FileBytes(1) = 42
        FileBytes(2) = 84
        FileBytes(3) = 73
        FileBytes(4) = 56
        FileBytes(5) = 51
        FileBytes(6) = 70
        FileBytes(7) = 42
        '1A,0A,00
        FileBytes(8) = 26
        FileBytes(9) = 10
        FileBytes(10) = 0
        'Comment
        FileComment = FileComment.PadRight(42, ChrW(0))
        For x As Integer = 0 To 41
            FileBytes(x + 11) = AscW(FileComment.Chars(x))
        Next
        'Data Size
        If FileBytesCounter1 + 19 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1 + 19, 4)
            FileBytes(54) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(53) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(54) = 0
            FileBytes(53) = FileBytesCounter1 + 19
        End If
        'Random Flag (either B or D)
        FileBytes(55) = 13
        FileBytes(56) = 0
        'Variable Size
        If FileBytesCounter1 + 2 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1 + 2, 4)
            FileBytes(58) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(57) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(58) = 0
            FileBytes(57) = FileBytesCounter1 + 2
        End If
        'Type ID
        FileBytes(59) = 5
        'Name
        FileName = FileName.PadRight(8, ChrW(0))
        For x As Integer = 0 To 7
            FileBytes(60 + x) = AscW(FileName.Chars(x))
        Next
        'Version
        FileBytes(68) = 0
        'Archived
        FileBytes(69) = 0
        'Variable Size Again
        If FileBytesCounter1 + 2 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1 + 2, 4)
            FileBytes(71) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(70) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(71) = 0
            FileBytes(70) = FileBytesCounter1 + 2
        End If
        'Total Token Count
        If FileBytesCounter1 > 255 Then
            Dim TempHex = cHex(FileBytesCounter1, 4)
            FileBytes(73) = cInteger(Mid(TempHex, 1, 2))
            FileBytes(72) = cInteger(Mid(TempHex, 3, 2))
        Else
            FileBytes(73) = 0
            FileBytes(72) = FileBytesCounter1
        End If
        'Totals data
        Dim Counter = 0
        For x As Integer = 0 To FileBytesCounter1 + 19
            Counter += FileBytes(x + 55)
        Next
        'Lower 16 bits of data totalled together
        If Hex(Counter).Length > 4 Then Counter = cInteger(Mid(cHex(Counter, 4), 1, 4))
        If Counter > 255 Then
            FileBytes(FileBytesCounter1 + 75) = cInteger(Mid(cHex(Counter, 4), 1, 2))
            FileBytes(FileBytesCounter1 + 74) = cInteger(Mid(cHex(Counter, 4), 3, 2))
        Else
            FileBytes(FileBytesCounter1 + 75) = 0
            FileBytes(FileBytesCounter1 + 74) = Counter
        End If
        Dim FinalBytes(FileBytesCounter1 + 75) As Byte
        For x As Integer = 0 To FileBytesCounter1 + 75
            FinalBytes(x) = FileBytes(x)
        Next
        Return FinalBytes
    End Function

    Shared Function cHex(ByVal IntValue As Integer, ByVal Length As Integer) As String
        Dim Int_Length As Integer = Int(Math.Log10(IntValue) / Math.Log10(16)) + 1
        Dim Temp_Value As Integer
        Dim Hex_String As String = ""
        For X As Integer = Length - 1 To 0 Step -1
            Temp_Value = Int(IntValue / (16 ^ X))
            Hex_String += Mid("0123456789ABCDEF", Temp_Value + 1, 1)
            IntValue -= Temp_Value * (16 ^ X)
        Next
        Return Hex_String
    End Function

    Shared Function cInteger(ByVal HexString As String) As Integer
        Dim Int_Value As Integer
        For X As Integer = HexString.Length To 1 Step -1
            Int_Value += (InStr("0123456789ABCDEF", Mid(HexString, X, 1)) - 1) * (16 ^ (HexString.Length - X))
        Next
        Return Int_Value
    End Function
It takes an array of bytes which consists of the data you want put into the program, a string which is the eight or less on calc program name, and a string which is a... (either 40 or 42 i can't remember) or less file comment, which is mostly pointless, but can be set anyways...  :P
thank you very very very much!
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D