Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


MorseCoder : By --Pillboi--

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
--Pillboi--
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Mar 2007
Posts: 1383
Location: I don't understand the question. Is this a 1 to 10 thing?

PostPosted: Tue Apr 15, 2008 2:34 pm    Post subject: MorseCoder : By --Pillboi-- Reply with quote

I have been playing with this for the past few days. It is very simple, just time-consuming.
It is used to convert a character/word/sentence into morse code, and play it back to you over the internal speaker.
Constructive criticism on coding/program is appreciated.
I guess, converting each letter into morse, storing it in a string, and then just going along that string, play different beeps depending on if it is a '-', '.' or ' '.
Would that have made any difference?
Source code + Program attached.
If you use part, or more of my program in either your program, or someone else's program, or just post it, please give me credit.




The Extension 'zip' was deactivated by an board admin, therefore this Attachment is not displayed.


_________________

Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.


Last edited by --Pillboi-- on Tue Apr 15, 2008 3:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Tue Apr 15, 2008 3:23 pm    Post subject: Reply with quote

This is a neat little program.
Just a couple of things:
Code:
if((sentence[count]>76) && (sentence[count]<123)){

char = 77 is 'M', 122 is 'z'. That's why some of the capital letters are getting turned into symbols. 97 is 'a', so I tihnk you just made a typo.

Also, for case 39, ''', I'm not sure, but you could probably use
Code:
case 39:

or
Code:
case 0x47:

or
Code:
case (char)0x47:


EDIT:
Quote:
I guess, converting each letter into morse, storing it in a string, and then just going along that string, play different beeps depending on if it is a '-', '.' or ' '.
Would that have made any difference?

It prbably would've made your code prettier and easier to follow, but also would've added a (very little) bit of extra ASM for the program to run, making it less efficient. Just depends on if you want it optimized for reading or for running.

Also just noticed,
Code:
for (count=0; count<=length; count++){

would go over the string + null character. Doesn't really matter for this, but if you were doing something else, it could really mess with it.
Back to top
View user's profile Send private message
--Pillboi--
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Mar 2007
Posts: 1383
Location: I don't understand the question. Is this a 1 to 10 thing?

PostPosted: Tue Apr 15, 2008 3:47 pm    Post subject: Reply with quote

Thanks. Yup, that was a typo, thanks for finding it. I meant to type 96.
I'll try that out, thanks! I should have thought of comparing the char to the integer value of the ascii character!
As far as the last bit is concerned. Running > Reading > Work.
Ah, good point. I remember seeing this earlier, and then forgot to change it.
It should be:
Code:
for (count=0; count<length; count++){

Right? Very Happy

Edit: Uploaded the new and improved program and source in place of the old one.

_________________

Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Tue Apr 15, 2008 7:50 pm    Post subject: Reply with quote

This is awesome, but I perfer the telephone. Morse code is too confusing, I don't know where the space is at when I hear people play it, so the words are all mixed up like... 'iwenttoschooltodayandgotanfonmytest'
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Wed Apr 16, 2008 3:29 am    Post subject: Reply with quote

this is really cool man, nice and simple, but a pretty unique idea Smile
_________________
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Wed Apr 16, 2008 8:35 am    Post subject: Reply with quote

This reminds me of the Transformers movie, when that black guy made the computer play morse code through the phone. You should make your program play morse code!
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
--Pillboi--
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Mar 2007
Posts: 1383
Location: I don't understand the question. Is this a 1 to 10 thing?

PostPosted: Wed Apr 16, 2008 10:58 am    Post subject: Reply with quote

HornyAZNBoy wrote:
This is awesome, but I perfer the telephone. Morse code is too confusing, I don't know where the space is at when I hear people play it, so the words are all mixed up like... 'iwenttoschooltodayandgotanfonmytest'
//
This reminds me of the Transformers movie, when that black guy made the computer play morse code through the phone. You should make your program play morse code!

Thanks! Well, in my program at least, their is a pause between each word.
Right... It does play morse code! Lol. You use windows right?
Or did you mean, through the phone, because that would be so awesome!
Snootae wrote:
this is really cool man, nice and simple, but a pretty unique idea Smile

Thank you! It just popped into my head one day: "Hey", said my brain, "Why don't you make a program which translates into morse code and plays it?" So of course, I replied to my brain: "That's a very good idea Brain". Wink

_________________

Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites