Author Topic: 8xp to txt Converter  (Read 11175 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
8xp to txt Converter
« on: November 12, 2010, 04:13:49 pm »
Hey,

So, I'm trying to make a 8xp to txt, just like Tokens or SourceCoder, to learn, though, not to use it, to learn more :D


So, i'm gonna need tokens:

http://omnimaga.pastebin.com/3KQ3PRFe

I'll use this ones.

However, I have no idea what kind of knowledge I need to use the things in front of the tokens:

Code: [Select]
tDisp           EQU       PROGTOK+16  ; DEh   'Disp_'
How could I implement this in a program, for example?

I'll probably give up after making the Disp one, so I have to make sure I can do it.


I'm gonna be using Python, but I don't need help with Python, I need help on what I should use in the program from that line tDisp above?

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: 8xp to txt Converter
« Reply #1 on: November 12, 2010, 04:16:51 pm »
Scoutdavid, I actually made one of these 4 days ago in c++. I could give you the source if you wanted.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #2 on: November 12, 2010, 04:21:00 pm »
Scoutdavid, I actually made one of these 4 days ago in c++. I could give you the source if you wanted.
Yes please, since I'm programming a C or Python one, that would be useful. Thanks much

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: 8xp to txt Converter
« Reply #3 on: November 12, 2010, 04:31:29 pm »
Here it is. I'm sure there is a better way to list the tokens. I basically write in ASM based c++. So as you can see, I just wanted to define data ;)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #4 on: November 12, 2010, 04:46:02 pm »
Here it is. I'm sure there is a better way to list the tokens. I basically write in ASM based c++. So as you can see, I just wanted to define data ;)

Thanks, I will study deep into later and post doubts here. Thanks

The first thing I tried to do was to compile it and run it, but got error on this line:

Code: [Select]
ifstream fSongFile (argv[1], ios::_Nocreate | ios::binary | ios::ate | ios::out);
C stdafx.h: No such file or directory.

I need a header that I don't have :S

_Nocreate' is not a member of `std::ios'

What the hell?


Does it work okay in your PC? Thanks

« Last Edit: November 12, 2010, 05:07:18 pm by ScoutDavid »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: 8xp to txt Converter
« Reply #5 on: November 12, 2010, 05:51:15 pm »
The problem might be that I did it in C++ and you are doing it in C. Just do a whatever it takes to open a file in C, you don't have to specifically open it the way I do. All that's important is that you open it in binary mode and that you can figure out the size.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #6 on: November 12, 2010, 05:52:12 pm »
The problem might be that I did it in C++ and you are doing it in C. Just do a whatever it takes to open a file in C, you don't have to specifically open it the way I do. All that's important is that you open it in binary mode and that you can figure out the size.

I'm opening C Plus Plus and using C Plus plus Converter, though

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: 8xp to txt Converter
« Reply #7 on: November 12, 2010, 05:55:13 pm »
That's strange... What are you using to compile the program? I used visual studio 2010. The year probably doesn't matter since this is a simple program, but perhaps if you don't have visual studio, you won't have exactly the same libraries.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #8 on: November 12, 2010, 05:56:17 pm »
That's strange... What are you using to compile the program? I used visual studio 2010. The year probably doesn't matter since this is a simple program, but perhaps if you don't have visual studio, you won't have exactly the same libraries.

I will install Visual Studio, since I need it for GUI C++ and this.

I was using Dev C++

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: 8xp to txt Converter
« Reply #9 on: November 12, 2010, 05:57:13 pm »
Visual studio is so nice. I've never used anything else, but it kicks the crap out of notepad.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #10 on: November 12, 2010, 06:28:27 pm »
I don't understand Visual Studi c++, first time using?

Console Application? Not a WF for sure, so which one?

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #11 on: November 13, 2010, 10:28:28 am »
Sorry for double post, but thanks to Kermm I am having some succes and managing to make a few tokens.

About 677 tokens left and the checksum and the header.

The hardest part will be to create the .8xp final :s

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: 8xp to txt Converter
« Reply #12 on: November 13, 2010, 10:29:38 am »
you can use the "quick modify" button in your post :)
The Game is angry with you ;D

nice project, though
« Last Edit: November 13, 2010, 10:32:01 am by aeTIos »
I'm not a nerd but I pretend:

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: 8xp to txt Converter
« Reply #13 on: November 13, 2010, 10:30:59 am »
I know I can modify, but it doesn't warn people about editing, and I will be needing help :S

So far, I have this:

http://codepad.org/ChPpTG3f
Fix:
*Space after Disp
*Instead of typing the text, importing a file
*Add checksum and header to .8xp files (whatever that is)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: 8xp to txt Converter
« Reply #14 on: November 13, 2010, 11:30:53 am »
Rule three states that you can double post as long as it's been at least six hours after your last post. So you're fine.

Good luck on the program.
Spoiler For Spoiler:



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